diff --git a/src/com/jpexs/decompiler/flash/gui/Main.java b/src/com/jpexs/decompiler/flash/gui/Main.java index 5bbbb9e5e..b27317849 100644 --- a/src/com/jpexs/decompiler/flash/gui/Main.java +++ b/src/com/jpexs/decompiler/flash/gui/Main.java @@ -220,7 +220,7 @@ public class Main { public static CancellableWorker importWorker = null; public static CancellableWorker deobfuscatePCodeWorker = null; - public static CancellableWorker swfPrepareWorker = null; + public static CancellableWorker swfPrepareWorker = null; public static boolean isSwfAir(Openable openable) { SwfSpecificCustomConfiguration conf = Configuration.getSwfSpecificCustomConfiguration(openable.getShortPathTitle()); @@ -1891,6 +1891,12 @@ public class Main { } } + if (mainFrame != null) { + for (Openable o : swf.items) { + mainFrame.getPanel().closeAbcExplorer(o); + } + } + openFile(swf.sourceInfo, null, sourceInfos.indexOf(swf.sourceInfo)); } @@ -2786,7 +2792,7 @@ public class Main { mainFrame.getPanel().tagListTree.setSelectionPathString(Configuration.lastSessionTagListSelection.get()); setSessionLoaded(true); mainFrame.getPanel().reload(true); - mainFrame.getPanel().updateUiWithCurrentOpenable(); + mainFrame.getPanel().updateUiWithCurrentOpenable(); }); } } @@ -3197,5 +3203,5 @@ public class Main { } catch (Exception ex) { throw new RuntimeException("Problems with creating the log files"); } - } + } } diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index ce160983e..2cab1b329 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -1606,6 +1606,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se ABCExplorerDialog abcExportDialog = abcExplorerDialogs.get(openable); if (abcExportDialog != null) { abcExportDialog.setVisible(false); + abcExplorerDialogs.remove(openable); } } } @@ -1621,6 +1622,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se ABCExplorerDialog abcExportDialog = abcExplorerDialogs.get(swf); if (abcExportDialog != null) { abcExportDialog.setVisible(false); + abcExplorerDialogs.remove(swf); } if (!onExit) { SwfSpecificCustomConfiguration cc = Configuration.getSwfSpecificCustomConfiguration(swf.getShortPathTitle()); @@ -5997,6 +5999,14 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se return statusPanel; } + public void closeAbcExplorer(Openable openable) { + ABCExplorerDialog dialog = abcExplorerDialogs.get(openable); + if (dialog != null) { + dialog.setVisible(false); + abcExplorerDialogs.remove(dialog); + } + } + public ABCExplorerDialog showAbcExplorer(Openable openable, ABC abc) { ABCExplorerDialog dialog = abcExplorerDialogs.get(openable); if (dialog != null) {