mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-25 06:21:16 +00:00
Save last selected Easy mode SWF
This commit is contained in:
@@ -3013,6 +3013,16 @@ public class Main {
|
||||
openFile(sourceInfos, (Openable openable) -> {
|
||||
mainFrame.getPanel().tagTree.setSelectionPathString(Configuration.lastSessionSelection.get());
|
||||
mainFrame.getPanel().tagListTree.setSelectionPathString(Configuration.lastSessionTagListSelection.get());
|
||||
|
||||
Set<SWF> allSwfs = mainFrame.getPanel().getAllSwfs();
|
||||
|
||||
for (SWF s : allSwfs) {
|
||||
String name = s.getFile() + "|" + s.getFileTitle();
|
||||
if (name.equals(Configuration.lastSessionEasySwf.get())) {
|
||||
mainFrame.getPanel().getEasyPanel().setSwf(s);
|
||||
}
|
||||
}
|
||||
|
||||
setSessionLoaded(true);
|
||||
mainFrame.getPanel().reload(true);
|
||||
mainFrame.getPanel().updateUiWithCurrentOpenable();
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package com.jpexs.decompiler.flash.gui;
|
||||
|
||||
import com.jpexs.decompiler.flash.SWF;
|
||||
import com.jpexs.decompiler.flash.configuration.Configuration;
|
||||
import com.jpexs.decompiler.flash.gui.player.FlashPlayerPanel;
|
||||
import com.jpexs.decompiler.flash.treeitems.OpenableList;
|
||||
@@ -155,6 +156,13 @@ public final class MainFrameRibbon extends AppRibbonFrame {
|
||||
Configuration.lastSessionFiles.set(sb.toString());
|
||||
Configuration.lastSessionFileTitles.set(sbt.toString());
|
||||
|
||||
SWF easySwf = panel.getEasyPanel().getSwf();
|
||||
if (easySwf != null) {
|
||||
Configuration.lastSessionEasySwf.set(easySwf.getFile()+ "|" + easySwf.getFileTitle());
|
||||
} else {
|
||||
Configuration.lastSessionEasySwf.set("");
|
||||
}
|
||||
|
||||
String pathResources = panel.tagTree.getSelectionPathString();
|
||||
if (pathResources != null) {
|
||||
Configuration.lastSessionSelection.set(pathResources);
|
||||
|
||||
@@ -6706,4 +6706,8 @@ public final class MainPanel extends JPanel implements TreeSelectionListener, Se
|
||||
public boolean fontEmbed(TreeItem item, boolean create) {
|
||||
return previewPanel.getFontPanel().fontEmbed(item, create);
|
||||
}
|
||||
|
||||
public EasyPanel getEasyPanel() {
|
||||
return easyPanel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -540,4 +540,7 @@ config.name.gui.splitPaneEasyVertical.dividerLocationPercent = (Internal) Easy U
|
||||
config.description.gui.splitPaneEasyVertical.dividerLocationPercent =
|
||||
|
||||
config.name.gui.splitPaneEasyHorizontal.dividerLocationPercent = (Internal) Easy UI horizontal splitter location
|
||||
config.description.gui.splitPaneEasyHorizontal.dividerLocationPercent =
|
||||
config.description.gui.splitPaneEasyHorizontal.dividerLocationPercent =
|
||||
|
||||
config.name.lastSessionEasySwf = Last Easy mode session file
|
||||
config.description.lastSessionEasySwf = Contains the selected SWF from the last session in Easy mode
|
||||
Reference in New Issue
Block a user