Fix to avoid nullpointer while loading session

This commit is contained in:
Jindra Petřík
2023-09-30 10:12:10 +02:00
parent 17ea470eea
commit 99c03b7dd8
2 changed files with 2 additions and 11 deletions

View File

@@ -2784,16 +2784,7 @@ public class Main {
openFile(sourceInfos, () -> {
mainFrame.getPanel().tagTree.setSelectionPathString(Configuration.lastSessionSelection.get());
mainFrame.getPanel().tagListTree.setSelectionPathString(Configuration.lastSessionTagListSelection.get());
if (mainFrame.getPanel().getCurrentView() == MainPanel.VIEW_RESOURCES) {
mainFrame.getPanel().valueChanged(new TreeSelectionEvent(
mainFrame.getPanel().tagTree, mainFrame.getPanel().tagTree.getSelectionPath(), false, null, null
));
}
if (mainFrame.getPanel().getCurrentView() == MainPanel.VIEW_TAGLIST) {
mainFrame.getPanel().valueChanged(new TreeSelectionEvent(
mainFrame.getPanel().tagListTree, mainFrame.getPanel().tagListTree.getSelectionPath(), false, null, null
));
}
mainFrame.getPanel().updateUiWithCurrentOpenable();
setSessionLoaded(true);
});
}