mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-19 12:47:49 -06:00
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:
parent
8c98ab027a
commit
b20c6c6ac7
1 changed files with 1 additions and 1 deletions
|
@ -270,7 +270,7 @@ class ExtruderManager(QObject):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
# Get the extruders of all printable meshes in the scene
|
# 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:
|
for mesh in meshes:
|
||||||
extruder_stack_id = mesh.callDecoration("getActiveExtruder")
|
extruder_stack_id = mesh.callDecoration("getActiveExtruder")
|
||||||
if not extruder_stack_id:
|
if not extruder_stack_id:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue