Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 741a6d7

Browse files
committed
Only kick off project pref loading when the project changes
1 parent a209bb7 commit 741a6d7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/project/ProjectManager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,10 +1142,14 @@ define(function (require, exports, module) {
11421142
var rootEntry = FileSystem.getDirectoryForPath(rootPath);
11431143
rootEntry.exists(function (err, exists) {
11441144
if (exists) {
1145-
PreferencesManager._setCurrentEditingFile(rootPath);
11461145
var projectRootChanged = (!_projectRoot || !rootEntry) ||
11471146
_projectRoot.fullPath !== rootEntry.fullPath;
11481147
var i;
1148+
1149+
if (projectRootChanged) {
1150+
PreferencesManager._setCurrentEditingFile(rootPath);
1151+
}
1152+
11491153

11501154
// Success!
11511155
var perfTimerName = PerfUtils.markStart("Load Project: " + rootPath);

0 commit comments

Comments
 (0)