From f3565a1bda4e157e218b84cda656fb2e8ee0a764 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Mon, 7 Apr 2014 10:01:41 +0200 Subject: [PATCH] Invert decision on when to show the GUI Previously, the code showed an error when the given action was not upload or verify. This is now reversed: the GUI is shown when the action is "GUI" (which is the default when no action specified). Since the action enum only contains these three values, there is no change in behaviour, but this makes it easier to add new actions later. --- app/src/processing/app/Base.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index ca0794f22..104d2818d 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -419,7 +419,8 @@ public class Base { path = new File(currentDirectory, path).getAbsolutePath(); } - if (handleOpen(path, nextEditorLocation(), !(action == ACTION.UPLOAD || action == ACTION.VERIFY)) == null) { + boolean showEditor = (action == ACTION.GUI); + if (handleOpen(path, nextEditorLocation(), showEditor) == null) { String mess = I18n.format(_("Failed to open sketch: \"{0}\""), path); // Open failure is fatal in upload/verify mode if (action == ACTION.VERIFY || action == ACTION.UPLOAD)