From 49e8c8d9d97df9e7a5281a736e644d2944abc43e Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 19 Aug 2019 12:52:31 +0200 Subject: [PATCH] Fix the check to see if a material can be removed CURA-6600 --- cura/Machines/MaterialManager.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/cura/Machines/MaterialManager.py b/cura/Machines/MaterialManager.py index 09416d1704..87245b5d53 100644 --- a/cura/Machines/MaterialManager.py +++ b/cura/Machines/MaterialManager.py @@ -262,12 +262,7 @@ class MaterialManager(QObject): # In the future we might enable this again, but right now, it's causing a ton of issues if we do (since it # corrupts the configuration) root_material_id = material_node.getMetaDataEntry("base_file") - material_group = self.getMaterialGroup(root_material_id) - if not material_group: - return False - - nodes_to_remove = [material_group.root_material_node] + material_group.derived_material_node_list - ids_to_remove = [node.getMetaDataEntry("id", "") for node in nodes_to_remove] + ids_to_remove = [metadata.get("id", "") for metadata in CuraContainerRegistry.getInstance().findInstanceContainersMetadata(base_file=root_material_id)] for extruder_stack in CuraContainerRegistry.getInstance().findContainerStacks(type = "extruder_train"): if extruder_stack.material.getId() in ids_to_remove: