mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix rendering before the extruder number decoration is set
If a render is triggered before this decorator is set it would crash. The rest of the code is robust against this being None, but here it would give a TypeError.
This commit is contained in:
parent
4e625da168
commit
7d806e7ae9
1 changed files with 4 additions and 1 deletions
|
@ -84,7 +84,10 @@ class SolidView(View):
|
||||||
|
|
||||||
per_mesh_stack = node.callDecoration("getStack")
|
per_mesh_stack = node.callDecoration("getStack")
|
||||||
|
|
||||||
extruder_index = int(node.callDecoration("getActiveExtruderPosition"))
|
extruder_index = node.callDecoration("getActiveExtruderPosition")
|
||||||
|
if extruder_index is None:
|
||||||
|
extruder_index = "0"
|
||||||
|
extruder_index = int(extruder_index)
|
||||||
|
|
||||||
# Use the support extruder instead of the active extruder if this is a support_mesh
|
# Use the support extruder instead of the active extruder if this is a support_mesh
|
||||||
if per_mesh_stack:
|
if per_mesh_stack:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue