mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Add error message for possible bugs in MaterialManager
CURA-5056
This commit is contained in:
parent
c0d55ac2a8
commit
27cce56467
1 changed files with 7 additions and 0 deletions
|
@ -102,6 +102,13 @@ class MaterialManager(QObject):
|
|||
# GUID -> material group list
|
||||
self._guid_material_groups_map = defaultdict(list)
|
||||
for root_material_id, material_group in self._material_group_map.items():
|
||||
# This can happen when we are updating with incomplete data.
|
||||
if material_group.root_material_node is None:
|
||||
Logger.log("e", "Missing root material node for [%s]. Probably caused by update using incomplete data."
|
||||
" Check all related signals for further debugging.",
|
||||
material_group.name)
|
||||
# Do nothing here, we wait for a next signal to trigger an update.
|
||||
return
|
||||
guid = material_group.root_material_node.metadata["GUID"]
|
||||
self._guid_material_groups_map[guid].append(material_group)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue