From 5490b96f2eff3f923d949da269d29f0f9e9d040a Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Thu, 28 May 2015 16:48:33 +0200 Subject: [PATCH] SHIFT-save (upper toolbar) triggers "save as". Fixes #2220 --- app/src/processing/app/EditorToolbar.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java index 67edcdb79..d007ed724 100644 --- a/app/src/processing/app/EditorToolbar.java +++ b/app/src/processing/app/EditorToolbar.java @@ -43,7 +43,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key /** Titles for each button when the shift key is pressed. */ static final String titleShift[] = { - _("Verify"), _("Upload Using Programmer"), _("New"), _("Open in Another Window"), _("Save"), _("Serial Monitor") + _("Verify"), _("Upload Using Programmer"), _("New"), _("Open in Another Window"), _("Save As..."), _("Serial Monitor") }; static final int BUTTON_COUNT = title.length; @@ -342,7 +342,11 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key break; case SAVE: - editor.handleSave(false); + if (e.isShiftDown()) { + editor.handleSaveAs(); + } else { + editor.handleSave(false); + } break; case EXPORT: