Double click timelined in Library shows its timeline.

Properly dispose ImagePanels
This commit is contained in:
Jindra Petřík
2024-10-29 16:55:43 +01:00
parent 9af01e7eab
commit 1e849f435d
4 changed files with 49 additions and 4 deletions
@@ -371,7 +371,7 @@ public class EasySwfPanel extends JPanel {
verticalSplitPane = new JPersistentSplitPane(JSplitPane.VERTICAL_SPLIT, topPanel, timelinePanel, Configuration.guiSplitPaneEasyVerticaldividerLocationPercent);
libraryTreeTable = new LibraryTreeTable();
libraryTreeTable = new LibraryTreeTable(this);
JScrollPane libraryScrollPane = new FasterScrollPane(libraryTreeTable);
JPanel libraryPanel = new JPanel(new BorderLayout());
@@ -464,13 +464,16 @@ public class EasySwfPanel extends JPanel {
if (timelined == null) {
stagePanel.clearAll();
timelinePanel.setTimelined(null);
libraryTreeTable.setSwf(null);
libraryPreviewPanel.clearAll();
} else {
SWF swf = timelined.getSwf();
libraryTreeTable.setSwf(swf);
stagePanel.setTimelined(swf, swf, 0, true, true, true, true, true, false, true);
libraryPreviewPanel.clearAll();
stagePanel.setTimelined(timelined, swf, 0, true, true, true, true, true, false, true);
stagePanel.pause();
stagePanel.gotoFrame(0);
timelinePanel.setTimelined(swf);
timelinePanel.setTimelined(timelined);
}
updateUndos();
}
@@ -501,4 +504,9 @@ public class EasySwfPanel extends JPanel {
}
Main.getMainFrame().getPanel().updateUiWithCurrentOpenable();
}
public void dispose() {
setTimelined(null);
undoManager.clear();
}
}