diff options
author | Lipu Fei <lipu.fei815@gmail.com> | 2017-07-06 13:06:02 +0300 |
---|---|---|
committer | Lipu Fei <lipu.fei815@gmail.com> | 2017-07-06 13:11:28 +0300 |
commit | 4e3ff1b770c99a5cda74b8e4974d31afe65da82d (patch) | |
tree | bbc06432e2af06275e09b5079a8efd160ee6ec25 /plugins/VersionUpgrade/VersionUpgrade25to26 | |
parent | ead94a84566153184c85521c9bfb842ab59fbd15 (diff) |
Fix version upgrade for 2.5 to 2.6
CURA-3975
- Preferences version is not set correctly
- The upgrade script should use a standalone version string because the
CuraApplication.SettingVersion can change
Diffstat (limited to 'plugins/VersionUpgrade/VersionUpgrade25to26')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py b/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py index 85f54dd654..699dd4d1bb 100644 --- a/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py +++ b/plugins/VersionUpgrade/VersionUpgrade25to26/VersionUpgrade25to26.py @@ -62,8 +62,8 @@ class VersionUpgrade25to26(VersionUpgrade): parser["general"]["visible_settings"] = ";".join(new_visible_settings) #Change the version number in the file. - if parser.has_section("general"): #It better have! - parser["general"]["version"] = "5" + parser.set("general", "version", "4") + parser.set("general", "setting_version", "1") #Re-serialise the file. output = io.StringIO() @@ -91,11 +91,9 @@ class VersionUpgrade25to26(VersionUpgrade): if not parser.has_section(each_section): parser.add_section(each_section) - # Change the version number in the file. - parser["metadata"]["setting_version"] = str(CuraApplication.SettingVersion) - - # Update version + # Update version numbers parser["general"]["version"] = "2" + parser["metadata"]["setting_version"] = "1" #Re-serialise the file. output = io.StringIO() |