mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Avoid reopening the serial monitor during upload
avoidMultipleOperations becomes false with a 10 seconds timeout after pressing the compile button.
The new code introduced by 99f6043ced
didn't take this into account, so the port was being reopened before staring the actual upload.
Also, make uploading variable static to avoid preferences confusion (this should be solved in a saner way giving every Editor instance its own set of properties, but it will hopefully fixes by the cli integration and workspace concept)
This commit is contained in:
parent
e659825058
commit
13b74f5ccb
@ -85,7 +85,7 @@ public abstract class AbstractMonitor extends JFrame implements ActionListener {
|
||||
suspend();
|
||||
}
|
||||
} else {
|
||||
if (closed && (Editor.avoidMultipleOperations == false)) {
|
||||
if (closed && (Editor.isUploading() == false)) {
|
||||
resume(boardPort);
|
||||
}
|
||||
}
|
||||
|
@ -219,7 +219,7 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
private JMenuItem saveAsMenuItem;
|
||||
|
||||
//boolean presenting;
|
||||
private boolean uploading;
|
||||
static private boolean uploading;
|
||||
|
||||
// undo fellers
|
||||
private JMenuItem undoItem;
|
||||
@ -2110,6 +2110,10 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
}
|
||||
}
|
||||
|
||||
static public boolean isUploading() {
|
||||
return uploading;
|
||||
}
|
||||
|
||||
private void resumeOrCloseSerialMonitor() {
|
||||
// Return the serial monitor window to its initial state
|
||||
if (serialMonitor != null) {
|
||||
|
Loading…
Reference in New Issue
Block a user