mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-30 19:52:13 +01:00
Serial prompt fixes.
Not showing the serial prompt if no serial ports are available. Showing the serial prompt for verbose upload, too.
This commit is contained in:
parent
544cfafb36
commit
6fa74cf711
@ -2233,7 +2233,6 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
|
||||
|
||||
public boolean serialPrompt() {
|
||||
populateSerialMenu();
|
||||
int count = serialMenu.getItemCount();
|
||||
Object[] names = new Object[count];
|
||||
for (int i = 0; i < count; i++) {
|
||||
@ -2298,7 +2297,9 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
// error message will already be visible
|
||||
}
|
||||
} catch (SerialNotFoundException e) {
|
||||
if (serialPrompt()) run();
|
||||
populateSerialMenu();
|
||||
if (serialMenu.getItemCount() == 0) statusError(e);
|
||||
else if (serialPrompt()) run();
|
||||
else statusNotice("Upload canceled.");
|
||||
} catch (RunnerException e) {
|
||||
//statusError("Error during upload.");
|
||||
@ -2329,6 +2330,11 @@ public class Editor extends JFrame implements RunnerListener {
|
||||
} else {
|
||||
// error message will already be visible
|
||||
}
|
||||
} catch (SerialNotFoundException e) {
|
||||
populateSerialMenu();
|
||||
if (serialMenu.getItemCount() == 0) statusError(e);
|
||||
else if (serialPrompt()) run();
|
||||
else statusNotice("Upload canceled.");
|
||||
} catch (RunnerException e) {
|
||||
//statusError("Error during upload.");
|
||||
//e.printStackTrace();
|
||||
|
Loading…
x
Reference in New Issue
Block a user