Fixed #1941 Export when no node is selected after SWF opening

This commit is contained in:
Jindra Petřík
2023-01-23 19:21:47 +01:00
parent c08c96a272
commit 91b420e80b
2 changed files with 13 additions and 3 deletions

View File

@@ -5,6 +5,7 @@ All notable changes to this project will be documented in this file.
### Fixed
- [#1948] Timeout while deobfuscation did not skip method
- [#1948] NullPointerException on Simplify expressions on incrementent/decrement
- [#1941] Export when no node is selected after SWF opening
## [18.3.3] - 2023-01-22
### Added
@@ -2908,6 +2909,7 @@ All notable changes to this project will be documented in this file.
[alpha 8]: https://github.com/jindrapetrik/jpexs-decompiler/compare/alpha7...alpha8
[alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7
[#1948]: https://www.free-decompiler.com/flash/issues/1948
[#1941]: https://www.free-decompiler.com/flash/issues/1941
[#1913]: https://www.free-decompiler.com/flash/issues/1913
[#1888]: https://www.free-decompiler.com/flash/issues/1888
[#1894]: https://www.free-decompiler.com/flash/issues/1894

View File

@@ -430,7 +430,7 @@ public abstract class MainFrameMenu implements MenuBuilder {
View.checkAccess();
if (openable != null) {
mainFrame.getPanel().export(onlySelected, mainFrame.getPanel().getCurrentTree().getSelected());
mainFrame.getPanel().export(onlySelected, getSelectedOrCurrentOpenable());
return true;
}
@@ -456,7 +456,7 @@ public abstract class MainFrameMenu implements MenuBuilder {
return;
}
mainFrame.getPanel().importSwfXml(mainFrame.getPanel().getCurrentTree().getSelected());
mainFrame.getPanel().importSwfXml(getSelectedOrCurrentOpenable());
}
protected void exportXmlActionPerformed(ActionEvent evt) {
@@ -467,7 +467,15 @@ public abstract class MainFrameMenu implements MenuBuilder {
return;
}
mainFrame.getPanel().exportSwfXml(mainFrame.getPanel().getCurrentTree().getSelected());
mainFrame.getPanel().exportSwfXml(getSelectedOrCurrentOpenable());
}
private List<TreeItem> getSelectedOrCurrentOpenable() {
List<TreeItem> sel = mainFrame.getPanel().getCurrentTree().getSelected();
if (sel.isEmpty() && openable != null) {
sel.add(openable);
}
return sel;
}
protected boolean searchActionPerformed(ActionEvent evt) {