Skip to content

Commit 01906af

Browse files
Do not find a tab based on filename, when we have a SketchCode
Filename-based matching is a bit more fragile, so just do a lookup based on the SketchCode object we already have instead.
1 parent c85027f commit 01906af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/src/processing/app/SketchController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ public boolean addFile(File sourceFile) {
788788
ensureExistence();
789789
sketch.addCode(newCode);
790790
}
791-
editor.selectTab(editor.findTabIndex(filename));
791+
editor.selectTab(editor.findTabIndex(newCode));
792792
}
793793
return true;
794794
}

0 commit comments

Comments
 (0)