From 48fd67cb1841248730d32a21c078e7ea6b845c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 13 Feb 2021 15:49:27 +0100 Subject: [PATCH] Fixed: Collapsing tag tree on SWF reload --- CHANGELOG.md | 1 + src/com/jpexs/decompiler/flash/gui/MainPanel.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 18cbb9f3c..f2166c3ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file. ### Fixed - #1298 AS1/2 properly decompiled setProperty/getProperty - AS1/2 Direct editation mark line on error +- Collapsing tag tree on SWF reload ## [13.0.3] - 2021-02-12 ### Added diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index c8648bd65..271a68e74 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -792,6 +792,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se public void loadSwfAtPos(SWFList newSwfs, int index) { View.checkAccess(); + List> expandedNodes = View.getExpandedNodes(tagTree); previewPanel.clear(); swfs.set(index, newSwfs); SWF swf = newSwfs.size() > 0 ? newSwfs.get(0) : null; @@ -801,11 +802,13 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se doFilter(); reload(false); + View.expandTreeNodes(tagTree, expandedNodes); } public void load(SWFList newSwfs, boolean first) { View.checkAccess(); + List> expandedNodes = View.getExpandedNodes(tagTree); previewPanel.clear(); swfs.add(newSwfs); @@ -816,6 +819,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se doFilter(); reload(false); + View.expandTreeNodes(tagTree, expandedNodes); } private ABCPanel getABCPanel() {