diff --git a/cura/Settings/SettingOverrideDecorator.py b/cura/Settings/SettingOverrideDecorator.py index e6cb793c38..c264d41a22 100644 --- a/cura/Settings/SettingOverrideDecorator.py +++ b/cura/Settings/SettingOverrideDecorator.py @@ -49,6 +49,7 @@ class SettingOverrideDecorator(SceneNodeDecorator): self._is_support_mesh = False self._is_cutting_mesh = False self._is_infill_mesh = False + self._is_anti_overhang_mesh = False self._stack.propertyChanged.connect(self._onSettingChanged) @@ -126,6 +127,12 @@ class SettingOverrideDecorator(SceneNodeDecorator): def isInfillMesh(self): return self._is_infill_mesh + def isAntiOverhangMesh(self): + return self._is_anti_overhang_mesh + + def _evaluateAntiOverhangMesh(self): + return bool(self._stack.userChanges.getProperty("anti_overhang_mesh", "value")) + def _evaluateIsCuttingMesh(self): return bool(self._stack.userChanges.getProperty("cutting_mesh", "value")) @@ -154,7 +161,9 @@ class SettingOverrideDecorator(SceneNodeDecorator): self._is_non_printing_mesh = self._evaluateIsNonPrintingMesh() self._is_non_thumbnail_visible_mesh = self._evaluateIsNonThumbnailVisibleMesh() - if setting_key == "support_mesh": + if setting_key == "anti_overhang_mesh": + self._is_anti_overhang_mesh = self._evaluateAntiOverhangMesh() + elif setting_key == "support_mesh": self._is_support_mesh = self._evaluateIsSupportMesh() elif setting_key == "cutting_mesh": self._is_cutting_mesh = self._evaluateIsCuttingMesh() diff --git a/cura/UI/ObjectsModel.py b/cura/UI/ObjectsModel.py index 6abb99932d..02d4096278 100644 --- a/cura/UI/ObjectsModel.py +++ b/cura/UI/ObjectsModel.py @@ -185,11 +185,18 @@ class ObjectsModel(ListModel): if per_object_stack: per_object_settings_count = per_object_stack.getTop().getNumInstances() - for mesh_type in ["anti_overhang_mesh", "infill_mesh", "cutting_mesh", "support_mesh"]: - if per_object_stack.getProperty(mesh_type, "value"): - node_mesh_type = mesh_type - per_object_settings_count -= 1 # do not count this mesh type setting - break + if node.callDecoration("isAntiOverhangMesh"): + node_mesh_type = "anti_overhang_mesh" + per_object_settings_count -= 1 # do not count this mesh type setting + elif node.callDecoration("isSupportMesh"): + node_mesh_type = "support_mesh" + per_object_settings_count -= 1 # do not count this mesh type setting + elif node.callDecoration("isCuttingMesh"): + node_mesh_type = "cutting_mesh" + per_object_settings_count -= 1 # do not count this mesh type setting + elif node.callDecoration("isInfillMesh"): + node_mesh_type = "infill_mesh" + per_object_settings_count -= 1 # do not count this mesh type setting if per_object_settings_count > 0: if node_mesh_type == "support_mesh":