mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 23:17:32 -06:00
Also upgrade definition_changes and user
Because these files share their version numbers with quality changes. Contributes to issue CURA-5054.
This commit is contained in:
parent
d8a066c1e7
commit
cf21e7c74b
2 changed files with 24 additions and 1 deletions
|
@ -74,6 +74,19 @@ class VersionUpgrade32to33(VersionUpgrade):
|
|||
setting_version = int(parser.get("metadata", "setting_version", fallback = 0))
|
||||
return format_version * 1000000 + setting_version
|
||||
|
||||
## Upgrades non-quality-changes instance containers to have the new version
|
||||
# number.
|
||||
def upgradeInstanceContainer(self, serialized, filename):
|
||||
parser = configparser.ConfigParser(interpolation = None)
|
||||
parser.read_string(serialized)
|
||||
|
||||
#Update version number.
|
||||
parser["general"]["version"] = "3"
|
||||
|
||||
result = io.StringIO()
|
||||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
|
||||
## Upgrades a quality changes container to the new format.
|
||||
def upgradeQualityChanges(self, serialized, filename):
|
||||
parser = configparser.ConfigParser(interpolation = None)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue