mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Handle exception when adhesion extruder could not be found
This should be pretty rare; the crash would only happen due to a race condition cura-8584
This commit is contained in:
parent
dcf78b4885
commit
73ca50d958
1 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@ import math
|
|||
|
||||
from typing import List, Optional, TYPE_CHECKING, Any, Set, cast, Iterable, Dict
|
||||
|
||||
from UM.Logger import Logger
|
||||
from UM.Mesh.MeshData import MeshData
|
||||
from UM.Mesh.MeshBuilder import MeshBuilder
|
||||
|
||||
|
@ -1078,7 +1079,11 @@ class BuildVolume(SceneNode):
|
|||
# setting does *not* have a limit_to_extruder setting (which means that we can't ask the global extruder what
|
||||
# the value is.
|
||||
adhesion_extruder = self._global_container_stack.getProperty("adhesion_extruder_nr", "value")
|
||||
adhesion_stack = self._global_container_stack.extruderList[int(adhesion_extruder)]
|
||||
try:
|
||||
adhesion_stack = self._global_container_stack.extruderList[int(adhesion_extruder)]
|
||||
except IndexError:
|
||||
Logger.warning(f"Couldn't find extruder with index '{adhesion_extruder}', defaulting to 0 instead.")
|
||||
adhesion_stack = self._global_container_stack.extruderList[0]
|
||||
skirt_brim_line_width = adhesion_stack.getProperty("skirt_brim_line_width", "value")
|
||||
|
||||
initial_layer_line_width_factor = adhesion_stack.getProperty("initial_layer_line_width_factor", "value")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue