From b7b8a354045a581be66b7f64b3508e20f54d211b Mon Sep 17 00:00:00 2001 From: Federico Fissore Date: Mon, 2 Mar 2015 10:08:54 +0100 Subject: [PATCH] NEW button now behaves as clicking File -> New menu entry. Fixes #2685 --- app/src/processing/app/EditorToolbar.java | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/app/src/processing/app/EditorToolbar.java b/app/src/processing/app/EditorToolbar.java index afb469a3b..e33789b36 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 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; @@ -334,14 +334,10 @@ public class EditorToolbar extends JComponent implements MouseInputListener, Key break; case NEW: - if (shiftPressed) { - try { - editor.base.handleNew(); - } catch (Exception e1) { - e1.printStackTrace(); - } - } else { - editor.base.handleNewReplace(); + try { + editor.base.handleNew(); + } catch (Exception e1) { + throw new RuntimeException(e1); } break;