From fb76fd94a98d0f4d7beaf059318192d4d56dfcc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sat, 14 Jan 2023 16:48:09 +0100 Subject: [PATCH] Fixed AS3 - empty P-code shown on clicking script --- CHANGELOG.md | 1 + .../jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java | 2 +- src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f85e1d780..d20aafe6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,7 @@ All notable changes to this project will be documented in this file. - [#1936] AS3 Direct editation - missing pop after call - [#1936] AS3 Direct editation - slots increment, decrement - [#1936] AS3 Direct editation - scope of nested functions +- AS3 - empty P-code shown on clicking script ## [18.3.2] - 2023-01-10 ### Removed diff --git a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java index 1d9f74c7a..1a586d07e 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/DecompiledEditorPane.java @@ -226,7 +226,7 @@ public class DecompiledEditorPane extends DebuggableEditorPane implements CaretL } abcPanel.detailPanel.showCard(DetailPanel.METHOD_GETTER_SETTER_TRAIT_CARD, trait, traitIndex, abc); MethodCodePanel methodCodePanel = abcPanel.detailPanel.methodTraitPanel.methodCodePanel; - if (reset || (methodCodePanel.getMethodIndex()!= methodIndex)) { + if (reset || (methodCodePanel.getMethodIndex()!= methodIndex) || (methodCodePanel.getABC() != abc)) { methodCodePanel.setMethod(scriptName, methodIndex, bi, abc, name, trait, script.scriptIndex); abcPanel.detailPanel.setEditMode(false); this.isStatic = isStatic; diff --git a/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java b/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java index e7738d13a..c89bab5a7 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/MethodCodePanel.java @@ -55,6 +55,10 @@ public class MethodCodePanel extends JPanel { private final DocsPanel docsPanel; + public ABC getABC() { + return sourceTextArea.abc; + } + public void refreshMarkers() { sourceTextArea.refreshMarkers(); }