Skip to content

Commit

Permalink
Disallow opening Serial monitor during compilation
Browse files Browse the repository at this point in the history
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 #6015
  • Loading branch information
facchinm committed Feb 24, 2017
1 parent 58422f7 commit c0a99f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/src/processing/app/Editor.java
Original file line number Diff line number Diff line change
Expand Up @@ -2168,6 +2168,8 @@ synchronized public void handleExport(final boolean usingProgrammer) {
console.clear();
status.progress(tr("Uploading to I/O Board..."));

avoidMultipleOperations = true;

new Thread(timeoutUploadHandler).start();
new Thread(usingProgrammer ? exportAppHandler : exportHandler).start();
}
Expand Down
1 change: 0 additions & 1 deletion app/src/processing/app/EditorToolbar.java
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ public void mousePressed(MouseEvent e) {
// launch a timeout timer which can reenable to upload button functionality an
if (!editor.avoidMultipleOperations) {
editor.handleExport(e.isShiftDown());
editor.avoidMultipleOperations = true;
}
break;

Expand Down

0 comments on commit c0a99f9

Please sign in to comment.