From 0f97dd6fde0231e4dc73ec5b2039c2abd9281ba1 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Mon, 22 May 2017 16:56:54 +0200 Subject: [PATCH] Let global stack handle limit to extruder Contributes to issue CURA-3738. --- cura/ConvexHullDecorator.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py index 44150cb76f..51b22755dd 100644 --- a/cura/ConvexHullDecorator.py +++ b/cura/ConvexHullDecorator.py @@ -298,7 +298,7 @@ class ConvexHullDecorator(SceneNodeDecorator): self._onChanged() ## Private convenience function to get a setting from the correct extruder (as defined by limit_to_extruder property). - def _getSettingProperty(self, setting_key, property="value"): + def _getSettingProperty(self, setting_key, property = "value"): per_mesh_stack = self._node.callDecoration("getStack") if per_mesh_stack: return per_mesh_stack.getProperty(setting_key, property) @@ -314,10 +314,8 @@ class ConvexHullDecorator(SceneNodeDecorator): extruder_stack_id = ExtruderManager.getInstance().extruderIds["0"] extruder_stack = ContainerRegistry.getInstance().findContainerStacks(id = extruder_stack_id)[0] return extruder_stack.getProperty(setting_key, property) - else: #Limit_to_extruder is set. Use that one. - extruder_stack_id = ExtruderManager.getInstance().extruderIds[str(extruder_index)] - stack = ContainerRegistry.getInstance().findContainerStacks(id = extruder_stack_id)[0] - return stack.getProperty(setting_key, property) + else: #Limit_to_extruder is set. The global stack handles this then. + return self._global_stack.getProperty(setting_key, property) ## Returns true if node is a descendant or the same as the root node. def __isDescendant(self, root, node):