Properly handling close all

This commit is contained in:
Jindra Petřík
2021-03-12 18:58:02 +01:00
parent 54e9601fae
commit 7426760153

View File

@@ -993,15 +993,25 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
swfs.clear();
oldItem = null;
clear();
updateUi();
updateUi();
List<SWF> swfsToClose = new ArrayList<>();
for (SWFList swfList : swfsLists) {
List<SWF> swfs2 = new ArrayList<>(swfList);
for (SWF swf : swfs2) {
swf.clearTagSwfs();
swfsToClose.addAll(swfList);
for (SWF swf : swfList) {
Main.populateSwfs(swf, swfsToClose);
}
}
for (SWF swf : swfsToClose) {
swf.clearTagSwfs();
}
refreshTree();
mainMenu.updateComponents(null);
previewPanel.clear();
return true;
}