Browse Source

Use isinstance instead of type checking for SceneNode

isinstance also checks for subclasses. In our case, SceneNode was just extended to CuraSceneNode so this test was failing.

Contributes to issue CURA-4766.
Ghostkeeper 7 years ago
parent
commit
b20c6c6ac7
1 changed files with 1 additions and 1 deletions
  1. 1 1
      cura/Settings/ExtruderManager.py

+ 1 - 1
cura/Settings/ExtruderManager.py

@@ -270,7 +270,7 @@ class ExtruderManager(QObject):
             return []
 
         # Get the extruders of all printable meshes in the scene
-        meshes = [node for node in DepthFirstIterator(scene_root) if type(node) is SceneNode and node.isSelectable()]
+        meshes = [node for node in DepthFirstIterator(scene_root) if isinstance(node, SceneNode) and node.isSelectable()]
         for mesh in meshes:
             extruder_stack_id = mesh.callDecoration("getActiveExtruder")
             if not extruder_stack_id: