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

Only kick off project pref loading when the project changes#7371

Merged
bchintx merged 2 commits intomasterfrom
dangoor/7250-jslint-flashing
Apr 2, 2014
Merged

Only kick off project pref loading when the project changes#7371
bchintx merged 2 commits intomasterfrom
dangoor/7250-jslint-flashing

Conversation

@dangoor
Copy link
Copy Markdown
Contributor

@dangoor dangoor commented Apr 1, 2014

This is a fix for #7250. What was happening is that there was a file tree refresh occurring and that was causing the PreferencesManager._setCurrentEditingFile in _loadProject to fire. The purpose of that call is to start the loading of project-level prefs, but in this case we weren't actually loading a new project and the result was that the preferences context for editing was being set incorrectly.

@peterflynn
Copy link
Copy Markdown
Member

@dangoor Do we understand why setting the 'current file' back to the project root was resulting in incorrect JSLint options? The "jslint.options" in our project file isn't path specific, so it seems like any path in the project should yield the same options settings...

@dangoor
Copy link
Copy Markdown
Contributor Author

dangoor commented Apr 1, 2014

@peterflynn Good question. It turns out that the project scope was being excluded when the project root was the same as the "current editing file". I just pushed a change that makes it so that project scope is also included in that case.

The first fix is still a valid improvement, because if there was a path-scoped preference it would improperly not be applied if _loadProject was called when a new project wasn't actually being loaded.

@peterflynn
Copy link
Copy Markdown
Member

Makes sense -- fixes look good to me!

@dangoor
Copy link
Copy Markdown
Contributor Author

dangoor commented Apr 2, 2014

@bchintx Peter's cool with this, but you're the reviewer of record. Want to take a look?

bchintx added a commit that referenced this pull request Apr 2, 2014
Only kick off project pref loading when the project changes
@bchintx bchintx merged commit aee91c6 into master Apr 2, 2014
@bchintx
Copy link
Copy Markdown
Contributor

bchintx commented Apr 2, 2014

Changes look good to me too. Merging...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants