mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-07-31 07:52:00 +08: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
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user