Skip to content

Commit 248fb2f

Browse files
committed
Do not show the library folder items or sketchs again
1 parent 4da0c11 commit 248fb2f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/processing/app/Base.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,10 +1189,11 @@ public void actionPerformed(ActionEvent e) {
11891189
//menu.addActionListener(listener);
11901190

11911191
boolean ifound = false;
1192+
boolean skipLibraryFolder = folder.equals((Base.getSketchbookFolder()));
11921193

11931194
for (int i = 0; i < list.length; i++) {
1194-
if ((list[i].charAt(0) == '.') ||
1195-
list[i].equals("CVS")) continue;
1195+
if ((list[i].charAt(0) == '.') || list[i].startsWith("__disabled_") || list[i].equals("CVS") ||
1196+
(skipLibraryFolder && list[i].compareToIgnoreCase("libraries")==0)) continue;
11961197

11971198
File subfolder = new File(folder, list[i]);
11981199
if (!subfolder.isDirectory()) continue;
@@ -1256,6 +1257,7 @@ protected boolean addLibraries(JMenu menu, File folder) throws IOException {
12561257
public boolean accept(File dir, String name) {
12571258
// skip .DS_Store files, .svn folders, etc
12581259
if (name.charAt(0) == '.') return false;
1260+
if (name.startsWith("__disabled_")) return false;
12591261
if (name.equals("CVS")) return false;
12601262
return (new File(dir, name).isDirectory());
12611263
}

0 commit comments

Comments
 (0)