From a67112b6f1cee513e7d5e033048ab6af03638273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Fri, 29 Sep 2023 19:21:49 +0200 Subject: [PATCH] ABC Explorer - Hilight selected ABC --- .../decompiler/flash/gui/abc/ABCExplorerDialog.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java index da392ec2d..e1d870637 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCExplorerDialog.java @@ -92,13 +92,18 @@ public class ABCExplorerDialog extends AppDialog { cnt.setLayout(new BorderLayout()); JPanel topPanel = new JPanel(new FlowLayout(FlowLayout.LEFT)); topPanel.add(new JLabel(translate("abc"))); + int selectedIndex = 0; int frame = 1; for (Tag t : swf.getTags()) { if (t instanceof ShowFrameTag) { frame++; } if (t instanceof ABCContainerTag) { - abcContainers.add((ABCContainerTag) t); + ABCContainerTag abcCnt = (ABCContainerTag)t; + if (abcCnt.getABC() == abc) { + selectedIndex = abcContainers.size(); + } + abcContainers.add(abcCnt); abcFrames.add(frame); } } @@ -129,7 +134,9 @@ public class ABCExplorerDialog extends AppDialog { cnt.add(topPanel, BorderLayout.NORTH); cnt.add(mainTabbedPane, BorderLayout.CENTER); - abcComboBoxActionPerformed(null); + if (!abcContainers.isEmpty()) { + abcComboBox.setSelectedIndex(selectedIndex); + } setSize(800, 600); setTitle(translate("title")); View.setWindowIcon(this);