From 820e370a936a3395d10b0258822ab86c780e9a17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 30 Sep 2023 18:38:45 +0200 Subject: [PATCH] ABCExplorer - scroll to visible --- .../decompiler/flash/gui/abc/ABCExplorerDialog.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java index ba4c5e5e4..36ed9ad02 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java @@ -330,8 +330,8 @@ public class ABCExplorerDialog extends AppDialog { Object root = model.getRoot(); Object parent = root; - Object treePath[] = new Object[parts.length + 1]; - treePath[0] = root; + Object treePathObjects[] = new Object[parts.length + 1]; + treePathObjects[0] = root; loopp:for (int p = 0; p < parts.length; p++) { String part = parts[p]; @@ -353,14 +353,16 @@ public class ABCExplorerDialog extends AppDialog { key = sv.getTitle(); } if (key.equals(part)) { - treePath[1 + p] = child; + treePathObjects[1 + p] = child; parent = child; continue loopp; } } return; } - tree.setSelectionPath(new TreePath(treePath)); + TreePath treePath = new TreePath(treePathObjects); + tree.setSelectionPath(treePath); + tree.scrollPathToVisible(treePath); } public void selectScriptInfo(int scriptIndex) {