Preference Packs: Add revert to backup option #6339
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds an option to the Preference Pack GUI to revert to a saved preference file.
When a preference pack is applied, FreeCAD automatically backs up the pre-pack config file. This PR adds a GUI to reverting to one of those saved backups. Right now this is a somewhat destructive process: the backup is a complete copy of the original config file, including things like "Recent Files". Reverting to the backup will thus reset your Recent Files list to whatever it was when the backup was taken.
In the future it would be best to make a more judicious backup, that only backs up the items that the preference pack affects. I submit this PR as an improvement over the current state of affairs, not as the end goal.
Testers: please make a manual backup of your user.cfg file prior to testing. To test, apply a preference pack (any one will do), then click the "Revert" button.