mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
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
This commit is contained in:
parent
ead94a8456
commit
4e3ff1b770
1 changed files with 4 additions and 6 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue