mirror of
https://github.com/arduino/Arduino.git
synced 2025-03-15 12:29:26 +01:00
Merge pull request #2723 from ffissore/fixed-new-button-behaviour
NEW button now behaves as clicking File -> New menu entry.
This commit is contained in:
commit
cd04958450
@ -43,7 +43,7 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
|
|||||||
|
|
||||||
/** Titles for each button when the shift key is pressed. */
|
/** Titles for each button when the shift key is pressed. */
|
||||||
static final String titleShift[] = {
|
static final String titleShift[] = {
|
||||||
_("Verify"), _("Upload Using Programmer"), _("New Editor Window"), _("Open in Another Window"), _("Save"), _("Serial Monitor")
|
_("Verify"), _("Upload Using Programmer"), _("New"), _("Open in Another Window"), _("Save"), _("Serial Monitor")
|
||||||
};
|
};
|
||||||
|
|
||||||
static final int BUTTON_COUNT = title.length;
|
static final int BUTTON_COUNT = title.length;
|
||||||
@ -334,14 +334,10 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NEW:
|
case NEW:
|
||||||
if (shiftPressed) {
|
|
||||||
try {
|
try {
|
||||||
editor.base.handleNew();
|
editor.base.handleNew();
|
||||||
} catch (Exception e1) {
|
} catch (Exception e1) {
|
||||||
e1.printStackTrace();
|
throw new RuntimeException(e1);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
editor.base.handleNewReplace();
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user