From d0080042ff5475604d71e3e2c148cebdabd863eb Mon Sep 17 00:00:00 2001 From: Erwan MATHIEU Date: Mon, 30 Sep 2024 13:10:19 +0200 Subject: [PATCH] Slightly simplify code CURA-11634 --- cura/Machines/VariantNode.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/Machines/VariantNode.py b/cura/Machines/VariantNode.py index a9dd8aa96b..b9ff0b5fad 100644 --- a/cura/Machines/VariantNode.py +++ b/cura/Machines/VariantNode.py @@ -63,9 +63,8 @@ class VariantNode(ContainerNode): filtered_materials = [material for material in materials if not self.machine.isExcludedMaterialBaseFile(material["id"])] for material in filtered_materials: - if material.get("abstract_color", False): - if not self.machine.supports_abstract_color: - continue # do not show abstract color profiles if the machine does not support them + if material.get("abstract_color", False) and not self.machine.supports_abstract_color: + continue # do not show abstract color profiles if the machine does not support them base_file = material["base_file"] if base_file not in self.materials: self.materials[base_file] = MaterialNode(material["id"], variant = self)