diff options
author | Ghostkeeper <rubend@tutanota.com> | 2017-07-10 12:45:03 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2017-07-10 12:45:03 +0300 |
commit | 9bfe18393fa699ae7a7203c82ff6efca783f8fce (patch) | |
tree | 6d0f22ca76be3316c27cf69959635d5c2f143e98 /cura/CuraApplication.py | |
parent | f0d327c0d0678be0bcab28f8bff7aae7433eeeb6 (diff) |
Make sure the preferences file doesn't always get upgraded
When the setting is equal to the default the setting_version won't get written to the preferences file. In that case the version upgrade system assumes that the setting_version was 0 or 1 and upgrades it.
This makes sure that the setting is never equal to the default so that it always gets written.
Found while working on CURA-4024.
Diffstat (limited to 'cura/CuraApplication.py')
-rwxr-xr-x | cura/CuraApplication.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cura/CuraApplication.py b/cura/CuraApplication.py index 048973c5c4..418b3c0e9b 100755 --- a/cura/CuraApplication.py +++ b/cura/CuraApplication.py @@ -268,7 +268,8 @@ class CuraApplication(QtApplication): ContainerRegistry.getInstance().load() # set the setting version for Preferences - Preferences.getInstance().addPreference("metadata/setting_version", CuraApplication.SettingVersion) + Preferences.getInstance().addPreference("metadata/setting_version", 0) + Preferences.getInstance().setValue("metadata/setting_version", self.SettingVersion) #Don't make it equal to the default so that the setting version always gets written to the file. Preferences.getInstance().addPreference("cura/active_mode", "simple") |