mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Correctly handle IndexError for defaultColors
CURA-4072 defaultColors is a list, so it's not KeyError but IndexError.
This commit is contained in:
parent
d7f3553c90
commit
3aabbab11f
1 changed files with 1 additions and 1 deletions
|
@ -177,7 +177,7 @@ class ProcessSlicedLayersJob(Job):
|
|||
position = int(extruder.getMetaDataEntry("position", default="0")) # Get the position
|
||||
try:
|
||||
default_color = ExtrudersModel.defaultColors[position]
|
||||
except KeyError:
|
||||
except IndexError:
|
||||
default_color = "#e0e000"
|
||||
color_code = extruder.material.getMetaDataEntry("color_code", default=default_color)
|
||||
color = colorCodeToRGBA(color_code)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue