From 640f34f452628c1ccd92187dc68946aff7c2f346 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Mon, 22 Feb 2021 23:16:14 +0100 Subject: [PATCH] Fixed: AS1/2 Goto search result not properly selecting line (delay) --- CHANGELOG.md | 3 ++ .../flash/gui/action/ActionPanel.java | 41 ++++++++++++++++--- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c964aa87..db8d64b96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. - Goto address dialog in Hex view (Ctrl+G or via context menu) - AS3 P-code editation checking all referenced labels exist - #1595 History of script search results per SWF +- Ignore case and RegExp options displayed on search results dialog ### Fixed - #1298 AS1/2 properly decompiled setProperty/getProperty @@ -43,6 +44,8 @@ All notable changes to this project will be documented in this file. - AS3 P-code editation - only first try offset was saved when multiple try with same label - AS3 decompilation: try..catch..finally suborder when debugline info not present - AS3 decompilation: increment/decrement on properties +- AS1/2 Goto search result not properly selecting line (delay) +- ActiveX exceptions when FlashPlayer disabled in classic GUI ### Changed - #1565, #1407, #1350 On BinaryData SWF save, parent SWF is saved diff --git a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java index 6f18c2f31..4fe073ceb 100644 --- a/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/action/ActionPanel.java @@ -69,6 +69,7 @@ import java.awt.Insets; import java.awt.event.ActionEvent; import java.io.IOException; import java.io.StringReader; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.concurrent.CancellationException; @@ -174,6 +175,23 @@ public class ActionPanel extends JPanel implements SearchListener scriptListeners = new ArrayList<>(); + + public void addScriptListener(Runnable listener) { + scriptListeners.add(listener); + } + + public void removeScriptListener(Runnable listener) { + scriptListeners.remove(listener); + } + + private void fireScript() { + List list = new ArrayList<>(scriptListeners); + for (Runnable r : list) { + r.run(); + } + } + public void clearSource() { View.checkAccess(); @@ -546,6 +564,7 @@ public class ActionPanel extends JPanel implements SearchListener