1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-16 11:21:18 +03:00

Removing extra nested "examples" menu.

This commit is contained in:
David A. Mellis
2009-06-07 11:28:53 +00:00
parent 1f838c0ae0
commit cbcbc5c4d5
2 changed files with 15 additions and 13 deletions

View File

@ -1074,14 +1074,20 @@ public class Base {
ifound = true;
} else {
// not a sketch folder, but maybe a subfolder containing sketches
JMenu submenu = new JMenu(list[i]);
// needs to be separate var
// otherwise would set ifound to false
boolean found = addSketches(submenu, subfolder, openReplaces); //, false);
if (found) {
menu.add(submenu);
ifound = true;
// don't create an extra menu level for a folder named "examples"
if (subfolder.getName().equals("examples")) {
boolean found = addSketches(menu, subfolder, openReplaces); //, false);
if (found) ifound = true;
} else {
// not a sketch folder, but maybe a subfolder containing sketches
JMenu submenu = new JMenu(list[i]);
// needs to be separate var
// otherwise would set ifound to false
boolean found = addSketches(submenu, subfolder, openReplaces); //, false);
if (found) {
menu.add(submenu);
ifound = true;
}
}
}
}