1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-29 10:24:12 +01:00

SHIFT-save (upper toolbar) triggers "save as". Fixes #2220

This commit is contained in:
Federico Fissore 2015-05-28 16:48:33 +02:00
parent c84fb7fc90
commit 5490b96f2e

View File

@ -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: