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.
This commit is contained in:
Matthijs Kooijman 2015-12-17 11:46:17 +01:00 committed by Martino Facchin
parent 3d573a7e86
commit fa82fe4db1
1 changed files with 1 additions and 1 deletions

View File

@ -787,7 +787,7 @@ public class SketchController {
ensureExistence();
sketch.addCode(newCode);
}
editor.selectTab(editor.findTabIndex(filename));
editor.selectTab(editor.findTabIndex(newCode));
}
return true;
}