Properly clean temp directory

This commit is contained in:
crschnick committed 2023-06-06 23:42:52 +00:00
1 parent e72fc2c487
commit d36c2b00ae
2 files changed
+10 -5

No files matched your search

@@ -166,7 +166,12 @@ public class BrowserComp extends SimpleComp {
model.getSelected().addListener((observable, oldValue, newValue) -> {
PlatformThread.runLaterIfNeeded(() -> {
var index = model.getOpenFileSystems().indexOf(newValue);
var tab = index != -1 ? tabs.getTabs().get(index) : null;
if (index == -1 || index >= tabs.getTabs().size()) {
tabs.getSelectionModel().select(null);
return;
}
var tab = tabs.getTabs().get(index);
tabs.getSelectionModel().select(tab);
});
});