Let global stack handle limit to extruder

Contributes to issue CURA-3738.
This commit is contained in:
Ghostkeeper 2017-05-22 16:56:54 +02:00
parent 884067d844
commit 0f97dd6fde
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -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):