From 3958217d933480ad45abc7e6505d53f630d5d657 Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Sun, 13 Sep 2015 08:31:41 +0200 Subject: [PATCH] #1047 6.0.2 open all scripts folders: fix --- .../src/com/jpexs/decompiler/graph/GraphTargetItem.java | 3 ++- src/com/jpexs/decompiler/flash/gui/MainPanel.java | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java index b81f8dd38..b71abfc2d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/graph/GraphTargetItem.java @@ -181,7 +181,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { @Override public String toString() { - return this.getClass().getName(); + return getClass().getName(); } public GraphTextWriter toString(GraphTextWriter writer, LocalData localData) throws InterruptedException { @@ -230,6 +230,7 @@ public abstract class GraphTargetItem implements Serializable, Cloneable { } public String toStringNoQuotes(LocalData localData) { + // todo: honfika: this method should not be called, maybe we should throw an exception return toString(); } diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 7222fb24e..d7f2274aa 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -961,11 +961,14 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se List nodes = getASTreeNodes(tagTree); for (TreeItem n : nodes) { if (n instanceof ClassesListTreeModel) { - ((ClassesListTreeModel) n).setFilter(filterField.getText()); + String filterText = filterField.getText(); + ((ClassesListTreeModel) n).setFilter(filterText); TagTreeModel tm = tagTree.getModel(); TreePath path = tm.getTreePath(n); tm.updateNode(path); - View.expandTreeNodes(tagTree, path, true); + if (!filterText.isEmpty()) { + View.expandTreeNodes(tagTree, path, true); + } } } }