From d2a32374b0c418075668b56a9d571b25cf79087a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Thu, 28 Sep 2023 10:21:02 +0200 Subject: [PATCH] Compound scripts have direct editing disabled - it might damage script initializer to edit it separately. --- src/com/jpexs/decompiler/flash/gui/MainPanel.java | 2 ++ .../jpexs/decompiler/flash/gui/abc/ABCPanel.java | 14 ++++++++++++++ .../flash/gui/locales/MainFrame.properties | 2 ++ 3 files changed, 18 insertions(+) diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index b6a34dba7..3bb36ee60 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -5140,6 +5140,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se abcPanel.setAbc(scriptLeaf.abc); abcPanel.decompiledTextArea.setScript(scriptLeaf, true); abcPanel.decompiledTextArea.setNoTrait(); + abcPanel.setCompound(true); } if (Configuration.displayAs3TraitsListAndConstantsPanel.get()) { @@ -5156,6 +5157,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se abcPanel.setAbc(scriptLeaf.abc); abcPanel.decompiledTextArea.setScript(scriptLeaf, true); abcPanel.decompiledTextArea.setNoTrait(); + abcPanel.setCompound(!scriptLeaf.isSimple); } if (Configuration.displayAs3TraitsListAndConstantsPanel.get()) { diff --git a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java index 3b5cf00e9..333ca71d1 100644 --- a/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/abc/ABCPanel.java @@ -203,6 +203,8 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener