Skip to content

Commit

Permalink
CSSTUDIO-2731 In comments, clarify that the Navigator application is …
Browse files Browse the repository at this point in the history
…ESS-specific.
  • Loading branch information
abrahamwolk committed Oct 10, 2024
1 parent 974bf1b commit af7207e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion core/ui/src/main/java/org/phoebus/ui/docking/DockPane.java
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ public void setDockParent(final Parent dock_parent)
if (dock_parent == null ||
dock_parent instanceof BorderPane ||
dock_parent instanceof SplitDock ||
dock_parent instanceof SplitPane) // "dock_parent instanceof SplitPane" is for the case of the Navigator application running
dock_parent instanceof SplitPane) // "dock_parent instanceof SplitPane" is for the case of the ESS-specific Navigator application running
this.dock_parent = dock_parent;
else
throw new IllegalArgumentException("Expected BorderPane or SplitDock or SplitPane, got " + dock_parent);
Expand Down
8 changes: 4 additions & 4 deletions core/ui/src/main/java/org/phoebus/ui/docking/SplitDock.java
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ else if (dock_parent instanceof SplitDock)
final boolean was_first = parent.removeItem(this);
parent.addItem(was_first, child);
}
else if (dock_parent instanceof SplitPane) {
else if (dock_parent instanceof SplitPane) { // "dock_parent instanceof SplitPane" is for the case of the ESS-specific Navigator application running
final SplitPane parent = (SplitPane) dock_parent;
// parent.getItems().get(1) == this, parent.getItems().get(0) == Navigator application,
// when Navigator is being displayed.
// parent.getItems().get(0) == this when Navigator is not being displayed.
// parent.getItems().get(1) == this, parent.getItems().get(0) == (ESS-specific) Navigator application,
// when the (ESS-specific) Navigator is being displayed.
// parent.getItems().get(0) == this when (ESS-specific) Navigator is not being displayed.
// No need to remove 'this' from parent, just update parent.getItems().get(last index) to child
parent.getItems().set(parent.getItems().size()-1, child);
}
Expand Down

0 comments on commit af7207e

Please sign in to comment.