mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 21:39:16 +08:00
Also remove instance containers referred to by extruder stacks
Contributes to issue CURA-7024.
This commit is contained in:
parent
b549d20ec5
commit
4307942544
@ -90,6 +90,12 @@ class VersionUpgrade44to45(VersionUpgrade):
|
|||||||
if "metadata" in parser and "machine" in parser["metadata"] and parser["metadata"]["machine"] in hidden_global_stacks:
|
if "metadata" in parser and "machine" in parser["metadata"] and parser["metadata"]["machine"] in hidden_global_stacks:
|
||||||
stack_id = urllib.parse.unquote_plus(os.path.basename(filename).split(".")[0])
|
stack_id = urllib.parse.unquote_plus(os.path.basename(filename).split(".")[0])
|
||||||
hidden_extruder_stacks.add(stack_id)
|
hidden_extruder_stacks.add(stack_id)
|
||||||
|
# The user container and definition changes container are specific to this stack. We need to delete those too.
|
||||||
|
if "containers" in parser:
|
||||||
|
if "0" in parser["containers"]: # User container.
|
||||||
|
hidden_instance_containers.add(parser["containers"]["0"])
|
||||||
|
if "6" in parser["containers"]: # Definition changes container.
|
||||||
|
hidden_instance_containers.add(parser["containers"]["6"])
|
||||||
os.remove(os.path.join(root, filename))
|
os.remove(os.path.join(root, filename))
|
||||||
|
|
||||||
# Walk a third time to remove all instance containers that are referred to by either of those.
|
# Walk a third time to remove all instance containers that are referred to by either of those.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user