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.
This commit is contained in:
Ghostkeeper 2018-01-05 13:02:00 +01:00
parent 8c98ab027a
commit b20c6c6ac7
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A

View file

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