From 42e17cb46725e3d2e9734036fb89482cd21f8fd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=F8=EDk?= Date: Sat, 29 Jun 2013 22:45:59 +0200 Subject: [PATCH] AS3 classes tree reload fix --- .../com/jpexs/decompiler/flash/abc/gui/ABCPanel.java | 11 +++++------ .../src/com/jpexs/decompiler/flash/gui/MainFrame.java | 5 +++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCPanel.java b/trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCPanel.java index b3fc080a9..bec159ec3 100644 --- a/trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCPanel.java +++ b/trunk/src/com/jpexs/decompiler/flash/abc/gui/ABCPanel.java @@ -203,13 +203,10 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener { public void switchAbc(int index) { listIndex = index; - if (index == -1) { - classTree.setDoABCTags(list); - } else { - List oneList = new ArrayList<>(); - oneList.add(list.get(index)); + classTree.setDoABCTags(list); + + if (index != -1) { this.abc = list.get(index).getABC(); - classTree.setDoABCTags(oneList); } updateConstList(); } @@ -480,6 +477,8 @@ public class ABCPanel extends JPanel implements ItemListener, ActionListener { public void hilightScript(ScriptPack pack) { TagTreeModel ttm = (TagTreeModel) Main.mainFrame.tagTree.getModel(); TreePath tp = ttm.getTagPath(pack); + if (tp == null) { + } Main.mainFrame.tagTree.setSelectionPath(tp); Main.mainFrame.tagTree.scrollPathToVisible(tp); } diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java index 13cad1b54..569a369f8 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/MainFrame.java @@ -1520,6 +1520,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi abcPanel.reload(); } reload(true); + doFilter(); break; case "ASSOCIATE": if (miAssociate.getState() == Main.isAssociated()) { @@ -1977,6 +1978,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi Main.stopWork(); JOptionPane.showMessageDialog(null, "Control flow restored"); abcPanel.reload(); + doFilter(); return true; } }.execute(); @@ -2055,6 +2057,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi JOptionPane.showMessageDialog(null, "Deobfuscation complete"); clearCache(); abcPanel.reload(); + doFilter(); return true; } }.execute(); @@ -2084,6 +2087,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi Main.stopWork(); JOptionPane.showMessageDialog(null, "Traps removed: " + cnt); abcPanel.reload(); + doFilter(); return true; } }.execute(); @@ -2113,6 +2117,7 @@ public class MainFrame extends JFrame implements ActionListener, TreeSelectionLi Main.stopWork(); JOptionPane.showMessageDialog(null, "Instructions removed: " + cnt); abcPanel.reload(); + doFilter(); return true; } }.execute();