diff options
author | Ghostkeeper <rubend@tutanota.com> | 2018-05-29 12:57:14 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2018-05-29 13:51:41 +0300 |
commit | 0d89240bca0c57ac7d6d6486fca9ecc35248fce1 (patch) | |
tree | af9f2dc622adbdc05b16f0f3152a1e55ae77e9a7 /plugins | |
parent | db16a6275f43ce9a51326ea9ddcaa80f8ab3a4c9 (diff) |
Copy support angle to infill support angle if used for hollow infill
This keeps the new profile as close to the profile in the previous version as possible.
Contributes to issue CURA-5108.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py b/plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py index 16f17c5e36..e2241fd195 100644 --- a/plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py +++ b/plugins/VersionUpgrade/VersionUpgrade33to34/VersionUpgrade33to34.py @@ -41,12 +41,16 @@ class VersionUpgrade33to34(VersionUpgrade): # Update version number. parser["general"]["version"] = "4" - #Renamed settings. if "values" in parser: + #If infill_hollow was enabled and the overhang angle was adjusted, copy that overhang angle to the new infill support angle. + if "infill_hollow" in parser["values"] and parser["values"]["infill_hollow"] and "support_angle" in parser["values"]: + parser["values"]["infill_support_angle"] = parser["values"]["support_angle"] + + #Renamed settings. for original, replacement in _renamed_settings.items(): - if original in parser["value"]: - parser["value"][replacement] = parser["value"][original] - del parser["value"][original] + if original in parser["values"]: + parser["values"][replacement] = parser["values"][original] + del parser["values"][original] result = io.StringIO() parser.write(result) |