Skip to content

Commit

Permalink
CSSTUDIO-1998 Add the keyboard shortcut "Ctrl + Shift + S" for "Save …
Browse files Browse the repository at this point in the history
…As...".
  • Loading branch information
abrahamwolk committed Aug 3, 2023
1 parent b5171e2 commit 6ec1935
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 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 @@ -332,8 +332,12 @@ private void handleGlobalKeys(final KeyEvent event)
if (item instanceof DockItemWithInput)
{
final DockItemWithInput active_item_with_input = (DockItemWithInput) item;
if (active_item_with_input.isDirty())
if (event.isShiftDown()) {
JobManager.schedule(Messages.Save, monitor -> active_item_with_input.save_as(monitor));
}
else if (active_item_with_input.isDirty()) {
JobManager.schedule(Messages.Save, monitor -> active_item_with_input.save(monitor));
}
}
event.consume();
}
Expand Down

0 comments on commit 6ec1935

Please sign in to comment.