Fixed: [#1962] Close button could close more than one file at once

Fixed: Simple editor - Selecting previous SWF when swf close
Changed: An item selected in the tag tree is needed for actions to be available.
Also SWF node is selected by default on first SWF opening.
This commit is contained in:
Jindra Petřík
2025-05-15 22:50:13 +02:00
parent 960f705071
commit cd91e3c3d2
6 changed files with 139 additions and 31 deletions

View File

@@ -59,8 +59,30 @@ public class EasyPanel extends JPanel {
tabSwitcher.setValue(swf);
}
public int indexOf(SWF swf) {
return tabSwitcher.indexOf(swf);
}
public void setSwfIndex(int index) {
if (index < 0) {
return;
}
if (index >= tabSwitcher.getValueCount()) {
return;
}
tabSwitcher.setSelectedIndex(index);
}
public SWF getSwfAtIndex(int index) {
if (index < 0 || index >= tabSwitcher.getValueCount()) {
return null;
}
return tabSwitcher.getValueAtIndex(index);
}
public void setNoSwf() {
easySwfPanel.setTimelined(null);
tabSwitcher.setValue(null);
}
public SWF getSwf() {