From 7056c0bd408fe359060654d9dfbafc1afaf04cff Mon Sep 17 00:00:00 2001 From: Konloch Date: Wed, 21 Jul 2021 10:05:05 -0700 Subject: [PATCH] Reload Resource Fix This fixes the resources being added twice but introduced a new bug, now reload resources resets the resource list. A better solution would be to preserve the original list, then add or remove anything new that was found, while updating the byte[] and ClassNodes of the existing resource containers --- .../java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java b/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java index 9c6d241e..374f4ed6 100644 --- a/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java +++ b/src/main/java/the/bytecode/club/bytecodeviewer/gui/MainViewerGUI.java @@ -875,6 +875,7 @@ public class MainViewerGUI extends JFrame reopen.add(container.file); } + BytecodeViewer.viewer.resourcePane.treeRoot.removeAllChildren(); BytecodeViewer.resourceContainers.clear(); for (File f : reopen)