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.
This commit is contained in:
Ghostkeeper 2018-05-29 11:57:14 +02:00
parent db16a6275f
commit 0d89240bca
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

@ -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)