Skip to content

Commit 0453606

Browse files
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.
1 parent 92aa64f commit 0453606

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/src/processing/app/Base.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,8 @@ public Base(String[] args) throws Exception {
419419
path = new File(currentDirectory, path).getAbsolutePath();
420420
}
421421

422-
if (handleOpen(path, nextEditorLocation(), !(action == ACTION.UPLOAD || action == ACTION.VERIFY)) == null) {
422+
boolean showEditor = (action == ACTION.GUI);
423+
if (handleOpen(path, nextEditorLocation(), showEditor) == null) {
423424
String mess = I18n.format(_("Failed to open sketch: \"{0}\""), path);
424425
// Open failure is fatal in upload/verify mode
425426
if (action == ACTION.VERIFY || action == ACTION.UPLOAD)

0 commit comments

Comments
 (0)