Skip to content

Commit fa82fe4

Browse files
matthijskooijmanfacchinm
authored andcommitted
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 3d573a7 commit fa82fe4

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
@@ -787,7 +787,7 @@ public boolean addFile(File sourceFile) {
787787
ensureExistence();
788788
sketch.addCode(newCode);
789789
}
790-
editor.selectTab(editor.findTabIndex(filename));
790+
editor.selectTab(editor.findTabIndex(newCode));
791791
}
792792
return true;
793793
}

0 commit comments

Comments
 (0)