mirror of https://github.com/noisymime/Arduino.git
In SketchController.nameCode, only switch tabs when adding file
When renaming a file, the current tab is already the correct one, so no need to switch. This allows looking up the tab index based on the SketchCode object, instead of doing a filename lookup.
This commit is contained in:
parent
fa82fe4db1
commit
8afeb501cb
|
@ -368,11 +368,9 @@ public class SketchController {
|
|||
return;
|
||||
}
|
||||
sketch.addCode(code);
|
||||
editor.selectTab(editor.findTabIndex(code));
|
||||
}
|
||||
|
||||
// set the new guy as current
|
||||
editor.selectTab(editor.findTabIndex(newName));
|
||||
|
||||
// update the tabs
|
||||
editor.header.rebuild();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue