mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-20 13:17:51 -06:00
Actually use setting_version to get the setting version number
This was sort of hidden because we've always incremented the normal version number up until now. Contributes to issue CURA-3427.
This commit is contained in:
parent
20e9d19587
commit
9820dac4a6
3 changed files with 3 additions and 3 deletions
|
@ -250,7 +250,7 @@ class VersionUpgrade21to22(VersionUpgrade):
|
||||||
parser = configparser.ConfigParser(interpolation = None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
parser.read_string(serialised)
|
parser.read_string(serialised)
|
||||||
format_version = int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised.
|
format_version = int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised.
|
||||||
setting_version = int(parser.get("general", "version", fallback = 0))
|
setting_version = int(parser.get("general", "setting_version", fallback = 0))
|
||||||
return format_version * 1000000 + setting_version
|
return format_version * 1000000 + setting_version
|
||||||
|
|
||||||
## Gets the fallback quality to use for a specific machine-variant-material
|
## Gets the fallback quality to use for a specific machine-variant-material
|
||||||
|
|
|
@ -146,5 +146,5 @@ class VersionUpgrade22to24(VersionUpgrade):
|
||||||
parser = configparser.ConfigParser(interpolation = None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
parser.read_string(serialised)
|
parser.read_string(serialised)
|
||||||
format_version = int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised.
|
format_version = int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised.
|
||||||
setting_version = int(parser.get("general", "version", fallback = 0))
|
setting_version = int(parser.get("general", "setting_version", fallback = 0))
|
||||||
return format_version * 1000000 + setting_version
|
return format_version * 1000000 + setting_version
|
||||||
|
|
|
@ -35,7 +35,7 @@ class VersionUpgrade25to26(VersionUpgrade):
|
||||||
parser = configparser.ConfigParser(interpolation = None)
|
parser = configparser.ConfigParser(interpolation = None)
|
||||||
parser.read_string(serialised)
|
parser.read_string(serialised)
|
||||||
format_version = int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised.
|
format_version = int(parser.get("general", "version")) #Explicitly give an exception when this fails. That means that the file format is not recognised.
|
||||||
setting_version = int(parser.get("general", "version", fallback = 0))
|
setting_version = int(parser.get("general", "setting_version", fallback = 0))
|
||||||
return format_version * 1000000 + setting_version
|
return format_version * 1000000 + setting_version
|
||||||
|
|
||||||
## Upgrades the preferences file from version 2.5 to 2.6.
|
## Upgrades the preferences file from version 2.5 to 2.6.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue