From fa56f881f47e9103262c9cb50e302c06dfd1a54f Mon Sep 17 00:00:00 2001 From: honfika Date: Sat, 2 Aug 2014 21:29:25 +0200 Subject: [PATCH] small fixes about removing tags, action reading --- src/com/jpexs/decompiler/flash/SWF.java | 2 +- src/com/jpexs/decompiler/flash/action/ActionListReader.java | 5 ++--- src/com/jpexs/decompiler/flash/gui/TagTreeModel.java | 2 +- src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java | 3 ++- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/SWF.java b/src/com/jpexs/decompiler/flash/SWF.java index b6bad2db8..805c23303 100644 --- a/src/com/jpexs/decompiler/flash/SWF.java +++ b/src/com/jpexs/decompiler/flash/SWF.java @@ -933,7 +933,7 @@ public final class SWF implements TreeItem, Timelined { List ret = new ArrayList<>(); List list2 = new ArrayList<>(); list2.addAll(tags); - List list = createASTagList(list2, null); + List list = createASTagList(list2, this); TagNode.setExport(list, true); if (!outdir.endsWith(File.separator)) { diff --git a/src/com/jpexs/decompiler/flash/action/ActionListReader.java b/src/com/jpexs/decompiler/flash/action/ActionListReader.java index cc74a3d41..cdf6e5d74 100644 --- a/src/com/jpexs/decompiler/flash/action/ActionListReader.java +++ b/src/com/jpexs/decompiler/flash/action/ActionListReader.java @@ -183,7 +183,7 @@ public class ActionListReader { } updateJumps(actions, jumps, containerLastActions, endAddress, version); - //updateActionStores(actions, jumps); + updateActionStores(actions, jumps); updateContainerSizes(actions, containerLastActions); updateActionLengths(actions, version); @@ -417,7 +417,6 @@ public class ActionListReader { if (a1 == null || a1 == nextActionAfterStore) { break; } - actions.remove(a1); store.add(a1); } aStore.setStore(store); @@ -579,7 +578,7 @@ public class ActionListReader { updateAddresses(actions, startIp, version); updateJumps(actions, jumps, containerLastActions, endAddress, version); - //updateActionStores(actions, jumps); + updateActionStores(actions, jumps); updateContainerSizes(actions, containerLastActions); updateActionLengths(actions, version); diff --git a/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java b/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java index 19738f166..b16792886 100644 --- a/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java +++ b/src/com/jpexs/decompiler/flash/gui/TagTreeModel.java @@ -121,7 +121,7 @@ public class TagTreeModel implements TreeModel { List binaryData = new ArrayList<>(); List others = new ArrayList<>(); - List actionScript = SWF.createASTagList(list, null); + List actionScript = SWF.createASTagList(list, swf); List actionScriptTags = new ArrayList<>(); SWF.getTagsFromTreeNodes(actionScript, actionScriptTags); diff --git a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java index 2a8e4829a..d80b77181 100644 --- a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java @@ -220,7 +220,8 @@ public class ActionPanel extends JPanel implements ActionListener, SearchListene public boolean search(final String txt, boolean ignoreCase, boolean regexp) { if ((txt != null) && (!txt.isEmpty())) { searchPanel.setOptions(ignoreCase, regexp); - List list = SWF.createASTagList(mainPanel.getCurrentSwf().tags, null); + SWF swf = mainPanel.getCurrentSwf(); + List list = SWF.createASTagList(swf.tags, swf); Map asms = new HashMap<>(); getASMs("", list, asms); final List found = new ArrayList<>();