Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Fix calculation of scoped setting defaults #967

Merged
merged 4 commits into from
Jul 16, 2017

Conversation

winstliu
Copy link
Contributor

@winstliu winstliu commented Jul 14, 2017

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Prior to this PR, the scoped setting default was ignored and the unscoped default was used instead. That was done in #841 to fix #774 (not being able to change scoped settings if the unscoped value was also changed). However, that caused a different bug where if the scoped default was different than the unscoped default, it was impossible to change the scoped value to the unscoped default. This PR aims to fix both issues. First, we search for the scoped default (without looking at the config.cson). Then we check the unscoped default. If the unscoped and scoped defaults are the same, we then further look at the config.cson to determine the currently-set unscoped value, which effectively acts as the scoped default.

Alternate Designs

None.

Benefits

Editing scoped settings should work as expected now.

Possible Drawbacks

Hopefully none.

Applicable Issues

Fixes #939
Refs #774

Wliu added 2 commits July 15, 2017 23:37
[ci skip]
[ci skip]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant