Skip to content

Commit c0a99f9

Browse files
committed
Disallow opening Serial monitor during compilation
Commit 6d5597b introduced a guard against multiple concurrent operations. This guard also avoid any real serial monitor "open" during the compile+upload phase, but it didn't handle keyboard shortcuts. Fixes arduino#6015
1 parent 58422f7 commit c0a99f9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

app/src/processing/app/Editor.java

+2
Original file line numberDiff line numberDiff line change
@@ -2168,6 +2168,8 @@ synchronized public void handleExport(final boolean usingProgrammer) {
21682168
console.clear();
21692169
status.progress(tr("Uploading to I/O Board..."));
21702170

2171+
avoidMultipleOperations = true;
2172+
21712173
new Thread(timeoutUploadHandler).start();
21722174
new Thread(usingProgrammer ? exportAppHandler : exportHandler).start();
21732175
}

app/src/processing/app/EditorToolbar.java

-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ public void mousePressed(MouseEvent e) {
376376
// launch a timeout timer which can reenable to upload button functionality an
377377
if (!editor.avoidMultipleOperations) {
378378
editor.handleExport(e.isShiftDown());
379-
editor.avoidMultipleOperations = true;
380379
}
381380
break;
382381

0 commit comments

Comments
 (0)