mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 05:49:03 +08:00
Add upgrade script for changed brim_location
setting
CURA-11526
This commit is contained in:
parent
77c1dca7ff
commit
2948af3f96
@ -37,6 +37,11 @@ class VersionUpgrade56to57(VersionUpgrade):
|
||||
if removed in visible_settings:
|
||||
visible_settings.remove(removed)
|
||||
|
||||
if "brim_outside_only" in parser["values"]:
|
||||
parser["values"]["brim_location"] = "outside" if bool(
|
||||
parser["values"]["brim_outside_only"]) else "everywhere"
|
||||
del parser["values"]["brim_outside_only"]
|
||||
|
||||
parser["general"]["visible_settings"] = ";".join(visible_settings)
|
||||
|
||||
result = io.StringIO()
|
||||
@ -68,6 +73,11 @@ class VersionUpgrade56to57(VersionUpgrade):
|
||||
if removed in parser["values"]:
|
||||
del parser["values"][removed]
|
||||
|
||||
if "brim_outside_only" in parser["values"]:
|
||||
parser["values"]["brim_location"] = "outside" if bool(
|
||||
parser["values"]["brim_outside_only"]) else "everywhere"
|
||||
del parser["values"]["brim_outside_only"]
|
||||
|
||||
result = io.StringIO()
|
||||
parser.write(result)
|
||||
return [filename], [result.getvalue()]
|
||||
|
Loading…
x
Reference in New Issue
Block a user