mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
Sligthly simplified buildImportMenu loop
This commit is contained in:
parent
534d62653c
commit
8ffbe05437
@ -1102,11 +1102,12 @@ public class Base {
|
||||
List<ContributedLibrary> libs = getSortedLibraries();
|
||||
String lastLibType = null;
|
||||
for (ContributedLibrary lib : libs) {
|
||||
if (lastLibType == null || !lastLibType.equals(lib.getTypes().get(0))) {
|
||||
String libType = lib.getTypes().get(0);
|
||||
if (!libType.equals(lastLibType)) {
|
||||
if (lastLibType != null) {
|
||||
importMenu.addSeparator();
|
||||
}
|
||||
lastLibType = lib.getTypes().get(0);
|
||||
lastLibType = libType;
|
||||
JMenuItem platformItem = new JMenuItem(I18n.format(tr("{0} libraries"), tr(lastLibType)));
|
||||
platformItem.setEnabled(false);
|
||||
importMenu.add(platformItem);
|
||||
|
Loading…
x
Reference in New Issue
Block a user