1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-28 09:24:14 +01:00

Merge pull request #9912 from matthijskooijman/no-empty-programmers-menu

Never leave programmers menu empty
This commit is contained in:
Martino Facchin 2020-03-25 09:10:40 +01:00 committed by GitHub
commit 6c7d1042a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1696,6 +1696,12 @@ public class Base {
addProgrammersForPlatform(boardPlatform, programmerMenus, group);
if (corePlatform != null)
addProgrammersForPlatform(corePlatform, programmerMenus, group);
if (programmerMenus.isEmpty()) {
JMenuItem item = new JMenuItem(tr("No programmers available for this board"));
item.setEnabled(false);
programmerMenus.add(item);
}
}
public void addProgrammersForPlatform(TargetPlatform platform, List<JMenuItem> menus, ButtonGroup group) {