diff options
author | Ghostkeeper <rubend@tutanota.com> | 2020-05-14 17:44:48 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2020-05-14 17:44:48 +0300 |
commit | 5a8d411c352e9347e349522152d0626e3e24ca3f (patch) | |
tree | 94342d85eef19658b4416032cde2c43bbc8f36d4 /plugins/VersionUpgrade | |
parent | 1111041a5bedaf126bf60a62446eeb529cf3dbfb (diff) |
Fix upgrading quality-changes profiles per extruder
These have a slightly different syntax apparently.
I thought I tested this before. But apparently not well enough.
Contributes to issue CURA-7433.
Diffstat (limited to 'plugins/VersionUpgrade')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade460to462/VersionUpgrade460to462.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade460to462/VersionUpgrade460to462.py b/plugins/VersionUpgrade/VersionUpgrade460to462/VersionUpgrade460to462.py index b5a952e418..1aa5e1b2da 100644 --- a/plugins/VersionUpgrade/VersionUpgrade460to462/VersionUpgrade460to462.py +++ b/plugins/VersionUpgrade/VersionUpgrade460to462/VersionUpgrade460to462.py @@ -90,16 +90,17 @@ class VersionUpgrade460to462(VersionUpgrade): parser_e3["general"]["definition"] = "deltacomb_base_extruder_3" results.append((parser_e2, filename + "_e2_upgrade")) # Hopefully not already taken. results.append((parser_e3, filename + "_e3_upgrade")) - elif parser["general"]["definition"] == "deltacomb": # On the global stack OR the per-extruder user container. + elif parser["general"]["definition"] == "deltacomb": # On the global stack, the per-extruder user container OR the per-extruder quality changes container. parser["general"]["definition"] = "deltacomb_dc20" - if "metadata" in parser and "extruder" in parser["metadata"]: # Per-extruder user container. + if "metadata" in parser and ("extruder" in parser["metadata"] or "position" in parser["metadata"]): # Per-extruder user container or quality changes container. parser_e2 = configparser.ConfigParser(interpolation = None) parser_e3 = configparser.ConfigParser(interpolation = None) parser_e2.read_dict(parser) parser_e3.read_dict(parser) - parser_e2["metadata"]["extruder"] += "_e2_upgrade" - parser_e3["metadata"]["extruder"] += "_e3_upgrade" + if "extruder" in parser["metadata"]: + parser_e2["metadata"]["extruder"] += "_e2_upgrade" + parser_e3["metadata"]["extruder"] += "_e3_upgrade" results.append((parser_e2, filename + "_e2_upgrade")) results.append((parser_e3, filename + "_e3_upgrade")) |