Only remove excluded materials that were added

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-08-07 09:50:53 +02:00
parent 8e49991087
commit accc4ccd21
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
2 changed files with 2 additions and 12 deletions

View file

@ -47,7 +47,8 @@ class VariantNode(ContainerNode):
materials = materials_per_base_file.values()
for excluded_material in self.machine.exclude_materials:
del materials[excluded_material]
if excluded_material in materials:
del materials[excluded_material]
for material in materials:
base_file = material["base_file"]