Browse Source

Let global stack handle limit to extruder

Contributes to issue CURA-3738.
Ghostkeeper 7 years ago
parent
commit
0f97dd6fde
1 changed files with 3 additions and 5 deletions
  1. 3 5
      cura/ConvexHullDecorator.py

+ 3 - 5
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):