mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 02:07:51 -06:00
Fixed another race condition that sometimes triggered when loading projects
CURA-1263
This commit is contained in:
parent
ae8865047e
commit
0bdd06735e
1 changed files with 4 additions and 2 deletions
|
@ -86,8 +86,10 @@ class SolidView(View):
|
||||||
extruder_id = node.callDecoration("getActiveExtruder")
|
extruder_id = node.callDecoration("getActiveExtruder")
|
||||||
if extruder_id:
|
if extruder_id:
|
||||||
extruder_index = max(0, self._extruders_model.find("id", extruder_id))
|
extruder_index = max(0, self._extruders_model.find("id", extruder_id))
|
||||||
|
try:
|
||||||
material_color = self._extruders_model.getItem(extruder_index)["color"]
|
material_color = self._extruders_model.getItem(extruder_index)["color"]
|
||||||
|
except KeyError:
|
||||||
|
material_color = self._extruders_model.defaultColors[0]
|
||||||
|
|
||||||
if extruder_index != ExtruderManager.getInstance().activeExtruderIndex:
|
if extruder_index != ExtruderManager.getInstance().activeExtruderIndex:
|
||||||
# Shade objects that are printed with the non-active extruder 25% darker
|
# Shade objects that are printed with the non-active extruder 25% darker
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue