Skip to content

Commit b988675

Browse files
committed
CSSTUDIO-3017 Only display the configuration window when a leaf representing a PV was clicked on.
1 parent 5292328 commit b988675

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

app/alarm/ui/src/main/java/org/phoebus/applications/alarm/ui/tree/AlarmTreeView.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -649,10 +649,12 @@ private void addClickSupport()
649649
return;
650650

651651
final AlarmTreeItem<?> item = tree_view.getSelectionModel().getSelectedItems().get(0).getValue();
652-
final ItemConfigDialog dialog = new ItemConfigDialog(model, item);
653-
DialogHelper.positionDialog(dialog, tree_view, -150, -300);
654-
// Show dialog, not waiting for it to close with OK or Cancel
655-
dialog.show();
652+
if (item instanceof AlarmClientLeaf alarmClientLeaf) {
653+
final ItemConfigDialog dialog = new ItemConfigDialog(model, alarmClientLeaf);
654+
DialogHelper.positionDialog(dialog, tree_view, -150, -300);
655+
// Show dialog, not waiting for it to close with OK or Cancel
656+
dialog.show();
657+
}
656658
});
657659
}
658660

0 commit comments

Comments
 (0)