mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Fix version upgrade for project loading
CURA-3756
This commit is contained in:
parent
1b4564bdb1
commit
40d70b5f39
12 changed files with 84 additions and 34 deletions
|
@ -142,6 +142,16 @@ class VersionUpgrade22to24(VersionUpgrade):
|
|||
config.write(output)
|
||||
return [filename], [output.getvalue()]
|
||||
|
||||
def upgradeQuality(self, serialised, filename):
|
||||
config = configparser.ConfigParser(interpolation = None)
|
||||
config.read_string(serialised) # Read the input string as config file.
|
||||
config.set("metadata", "type", "quality_changes") # Update metadata/type to quality_changes
|
||||
config.set("general", "version", "2") # Just bump the version number. That is all we need for now.
|
||||
|
||||
output = io.StringIO()
|
||||
config.write(output)
|
||||
return [filename], [output.getvalue()]
|
||||
|
||||
def getCfgVersion(self, serialised):
|
||||
parser = configparser.ConfigParser(interpolation = None)
|
||||
parser.read_string(serialised)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue