Skip to content

Commit

Permalink
Merge pull request #3112 from ControlSystemStudio/tab_close
Browse files Browse the repository at this point in the history
Use the dockpane close listener instead of tab.onclose #3111
  • Loading branch information
shroffk authored Aug 16, 2024
2 parents ab65c5c + 75f4084 commit 36d1e2a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,7 @@ else if(clazz.isAssignableFrom(AdvancedSearchViewController.class)){
log.log(Level.SEVERE, "Failed to acquire a valid logbook client");
}
tab = new DockItem(this, loader.getRoot());
tab.setOnClosed(event -> {
controller.shutdown();
});
tab.addClosedNotification(()-> controller.shutdown());
DockPane.getActiveDockPane().addTab(tab);
} catch (IOException e)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public LogEntryTable(final LogEntryTableApp app) {
loader.load();
controller = loader.getController();
DockItem tab = new DockItem(this, loader.getRoot());
tab.setOnClosed(event -> controller.shutdown());
tab.addClosedNotification(()-> controller.shutdown());
DockPane.getActiveDockPane().addTab(tab);
} catch (IOException e) {
log.log(Level.WARNING, "Cannot load UI", e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ else if(clazz.isAssignableFrom(AdvancedSearchViewController.class)){
{
Logger.getLogger(getClass().getName()).log(Level.WARNING, "Cannot load UI", e);
}
tab.setOnClosed(event -> {
tab.addClosedNotification(()->{
// dispose();
});
}
Expand Down

0 comments on commit 36d1e2a

Please sign in to comment.