Compound script editation always disabled

This commit is contained in:
Jindra Petřík
2025-05-31 15:35:01 +02:00
parent db2fa7f6e6
commit 3442d68de2
@@ -206,6 +206,8 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
private String lastDecompiled = null; private String lastDecompiled = null;
private JLabel linksLabel = new JLabel(""); private JLabel linksLabel = new JLabel("");
private boolean compound = false;
public MainPanel getMainPanel() { public MainPanel getMainPanel() {
View.checkAccess(); View.checkAccess();
@@ -219,7 +221,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
public void setDecompiledEditEnabled(boolean value) { public void setDecompiledEditEnabled(boolean value) {
decompiledTextArea.setEnabled(value); decompiledTextArea.setEnabled(value);
editDecompiledButton.setEnabled(value); editDecompiledButton.setEnabled(value && !compound);
toolbarPanel.setEnabled(value); toolbarPanel.setEnabled(value);
} }
@@ -2117,6 +2119,7 @@ public class ABCPanel extends JPanel implements ItemListener, SearchListener<Scr
experimentalLabel.setVisible(!useFlex && !value); experimentalLabel.setVisible(!useFlex && !value);
flexLabel.setVisible(useFlex && !value); flexLabel.setVisible(useFlex && !value);
editDecompiledButton.setEnabled(!value); editDecompiledButton.setEnabled(!value);
this.compound = value;
} }
public void setScript(ScriptPack scriptPack) { public void setScript(ScriptPack scriptPack) {