diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b8af448..b33b98733 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +### Fixed +- [#2366] Running simple editor on background slowing down other views ## [22.0.0] - 2024-11-10 ### Added @@ -3658,6 +3660,7 @@ Major version of SWF to XML export changed to 2. [alpha 9]: https://github.com/jindrapetrik/jpexs-decompiler/compare/alpha8...alpha9 [alpha 8]: https://github.com/jindrapetrik/jpexs-decompiler/compare/alpha7...alpha8 [alpha 7]: https://github.com/jindrapetrik/jpexs-decompiler/releases/tag/alpha7 +[#2366]: https://www.free-decompiler.com/flash/issues/2366 [#1619]: https://www.free-decompiler.com/flash/issues/1619 [#2360]: https://www.free-decompiler.com/flash/issues/2360 [#2357]: https://www.free-decompiler.com/flash/issues/2357 diff --git a/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java b/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java index f9846852e..72a3eec27 100644 --- a/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java +++ b/src/com/jpexs/decompiler/flash/easygui/EasyPanel.java @@ -17,6 +17,7 @@ package com.jpexs.decompiler.flash.easygui; import com.jpexs.decompiler.flash.SWF; +import com.jpexs.decompiler.flash.gui.MainPanel; import com.jpexs.decompiler.flash.gui.View; import java.awt.BorderLayout; import java.util.ArrayList; @@ -37,8 +38,8 @@ public class EasyPanel extends JPanel { private TabSwitcher tabSwitcher; private EasySwfPanel easySwfPanel; - public EasyPanel() { - easySwfPanel = new EasySwfPanel(); + public EasyPanel(MainPanel mainPanel) { + easySwfPanel = new EasySwfPanel(mainPanel); tabSwitcher = new TabSwitcher<>(easySwfPanel); setLayout(new BorderLayout()); add(tabSwitcher, BorderLayout.CENTER); @@ -62,6 +63,10 @@ public class EasyPanel extends JPanel { tabSwitcher.setValue(swf); } + public void setNoSwf() { + easySwfPanel.setTimelined(null); + } + public SWF getSwf() { return tabSwitcher.getSelectedValue(); } diff --git a/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java b/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java index aa564de99..e42352488 100644 --- a/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java +++ b/src/com/jpexs/decompiler/flash/easygui/EasySwfPanel.java @@ -26,6 +26,7 @@ import com.jpexs.decompiler.flash.exporters.commonshape.Matrix; import com.jpexs.decompiler.flash.gui.FasterScrollPane; import com.jpexs.decompiler.flash.gui.ImagePanel; import com.jpexs.decompiler.flash.gui.Main; +import com.jpexs.decompiler.flash.gui.MainPanel; import com.jpexs.decompiler.flash.gui.RegistrationPointPosition; import com.jpexs.decompiler.flash.gui.TimelinedMaker; import com.jpexs.decompiler.flash.gui.TransformPanel; @@ -104,8 +105,9 @@ public class EasySwfPanel extends JPanel { private static final String PROPERTIES_INSTANCE = "Instance"; private DocumentPropertiesPanel documentPropertiesPanel; private InstancePropertiesPanel instancePropertiesPanel; + private final MainPanel mainPanel; - public EasySwfPanel() { + public EasySwfPanel(MainPanel mainPanel) { setLayout(new BorderLayout()); stagePanel = new ImagePanel(); @@ -539,6 +541,7 @@ public class EasySwfPanel extends JPanel { } } }); + this.mainPanel = mainPanel; } private void updatePropertiesPanel() { @@ -563,6 +566,9 @@ public class EasySwfPanel extends JPanel { if (this.timelined == timelined) { return; } + if (mainPanel.getCurrentView() != MainPanel.VIEW_EASY) { + timelined = null; + } this.timelined = timelined; if (timelined == null) { stagePanel.clearAll(); diff --git a/src/com/jpexs/decompiler/flash/gui/MainPanel.java b/src/com/jpexs/decompiler/flash/gui/MainPanel.java index 77f8d8e33..5bbac413d 100644 --- a/src/com/jpexs/decompiler/flash/gui/MainPanel.java +++ b/src/com/jpexs/decompiler/flash/gui/MainPanel.java @@ -1302,7 +1302,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se welcomePanel = createWelcomePanel(); add(welcomePanel, BorderLayout.CENTER); - easyPanel = new EasyPanel(); + easyPanel = new EasyPanel(this); contentPanel = new JPanel(new CardLayout()); contentPanel.add(welcomePanel, WELCOME_PANEL); @@ -5678,6 +5678,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se setTreeModel(view); switch (view) { case VIEW_DUMP: + easyPanel.setNoSwf(); pinsPanel.setVisible(false); currentView = view; Configuration.lastView.set(currentView); @@ -5693,6 +5694,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se detailPanel.setVisible(false); return true; case VIEW_RESOURCES: + easyPanel.setNoSwf(); pinsPanel.setVisible(true); currentView = view; Configuration.lastView.set(currentView); @@ -5715,7 +5717,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se reload(true); updateUiWithCurrentOpenable(); return true; - case VIEW_EASY: + case VIEW_EASY: SWF swf = getCurrentSwf(); pinsPanel.setVisible(false); currentView = view; @@ -5728,6 +5730,7 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se } return true; case VIEW_TAGLIST: + easyPanel.setNoSwf(); pinsPanel.setVisible(true); currentView = view; Configuration.lastView.set(currentView);