mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
avoid "Menu has no enabled items" exception
This commit is contained in:
parent
73649c2f60
commit
90ecc3773d
@ -1140,7 +1140,6 @@ public class Base {
|
||||
// Cycle through all packages
|
||||
for (TargetPackage targetPackage : packages.values()) {
|
||||
String packageName = targetPackage.getName();
|
||||
|
||||
// For every package cycle through all platform
|
||||
for (TargetPlatform targetPlatform : targetPackage.platforms()) {
|
||||
String platformName = targetPlatform.getName();
|
||||
@ -1247,15 +1246,15 @@ public class Base {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (menuItemsToClickAfterStartup.isEmpty()) {
|
||||
menuItemsToClickAfterStartup.add(selectFirstEnabledMenuItem(boardsMenu));
|
||||
}
|
||||
if (menuItemsToClickAfterStartup.isEmpty()) {
|
||||
menuItemsToClickAfterStartup.add(selectFirstEnabledMenuItem(boardsMenu));
|
||||
}
|
||||
|
||||
for (JMenuItem menuItemToClick : menuItemsToClickAfterStartup) {
|
||||
menuItemToClick.setSelected(true);
|
||||
menuItemToClick.getAction().actionPerformed(new ActionEvent(this, -1, ""));
|
||||
}
|
||||
for (JMenuItem menuItemToClick : menuItemsToClickAfterStartup) {
|
||||
menuItemToClick.setSelected(true);
|
||||
menuItemToClick.getAction().actionPerformed(new ActionEvent(this, -1, ""));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user