mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
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.
This commit is contained in:
parent
6a09ee5eb6
commit
f3565a1bda
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user