Fixed: #2366 Running simple editor on background slowing down other views

This commit is contained in:
Jindra Petřík
2024-11-20 17:05:37 +01:00
parent 4aa84b3631
commit 594cf5c839
4 changed files with 22 additions and 5 deletions
@@ -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<SWF> 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();
}