small fixes

This commit is contained in:
2015-03-07 21:01:41 +01:00
parent 46f73248bd
commit 9443e32c1b
6 changed files with 35 additions and 13 deletions
@@ -778,12 +778,13 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
}
}
/*for (SWFList swfList : swfs) {
List<SWF> swfs2 = new ArrayList<>(swfList);
for (SWF swf : swfs2) {
swf.clearTagSwfs();
}
}*/
for (SWFList swfList : swfs) {
List<SWF> swfs2 = new ArrayList<>(swfList);
for (SWF swf : swfs2) {
swf.clearTagSwfs();
}
}
swfs.clear();
oldItem = null;
clear();
@@ -807,6 +808,11 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
}
}
List<SWF> swfs2 = new ArrayList<>(swfList);
for (SWF swf : swfs2) {
swf.clearTagSwfs();
}
swfs.remove(swfList);
oldItem = null;
clear();
@@ -2158,6 +2164,7 @@ public final class MainPanel extends JPanel implements ActionListener, TreeSelec
File selfile = Helper.fixDialogFile(selectedFile);
byte[] data = Helper.readFile(selfile.getAbsolutePath());
new BinaryDataImporter().importData(bt, data);
refreshTree(bt.getSwf());
reload(true);
}
}
+1 -1
View File
@@ -496,7 +496,7 @@ public class View {
}
expandedNodes.add(pathAsStringList);
}
} catch (IndexOutOfBoundsException ex) {
} catch (IndexOutOfBoundsException | NullPointerException ex) {
// TreeNode was removed, ignore
}
}
@@ -554,6 +554,7 @@ public class TagTreeContextMenu extends JPopupMenu implements ActionListener {
if (swf.binaryData != null) {
// embedded swf
swf.binaryData.innerSwf = null;
swf.clearTagSwfs();
mainPanel.refreshTree(null);
} else {
Main.closeFile(swf.swfList);