Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve how tuning dictionary edits are handled #367

Closed
cameronwhite opened this issue Jan 23, 2022 · 0 comments
Closed

Improve how tuning dictionary edits are handled #367

cameronwhite opened this issue Jan 23, 2022 · 0 comments
Milestone

Comments

@cameronwhite
Copy link
Member

This is somewhat related to #342

Currently only one tuning dictionary file (tunings.json) is loaded or saved. The first time the program is run, the tuning dictionary from the installation folder is loaded. After exiting, the tuning dictionary's contents are saved to the user's prefs folder, and this file will be loaded instead of the one in the install folder on subsequent runs. Any edits, like new tunings, removing tunings, or editing a tuning will be written out to this tunings.json in the user prefs folder

This becomes problematic when we make any changes to the default tuning dictionary shipped with the program, e.g. adding or reordering some tunings (#363). These changes won't be seen by existing users unless they clear out their prefs folder

I think this should be changed so that the factory tuning dictionary is always loaded, and the user prefs tuning dictionary only contains new custom tunings that the user added. If we want to allow the user to delete or edit factory tunings, the JSON format could include some way to express overrides.

@cameronwhite cameronwhite added this to the Beta milestone Jan 27, 2022
cameronwhite added a commit that referenced this issue Jan 30, 2022
Add a flag along with each tuning for whether it is editable - only tunings from the user's local tuning dictionary will be editable, and only writable tunings will be saved out to the local dictionary on exit

This change just adds the new struct & flag, but doesn't change any behaviour with saving / loading of dictionaries.

Bug: #367
cameronwhite added a commit that referenced this issue Jan 30, 2022
This ensures that updates to the default tuning dictionary are actually visible, instead of being hidden due to the tunings.json in the user prefs dir
Also, only new tunings or tunings loaded from the user prefs dir are saved back out to the user prefs dir, since this file is combined with the factory tuning dictionary when being loaded

Bug: #367
@cameronwhite cameronwhite modified the milestones: Beta, Alpha 18 Jan 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant