mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-19 23:53:15 +08:00
Don't crash when materials are not registered
It can't update the nodes structure with the links between materials then. Contributes to issue CURA-6444.
This commit is contained in:
parent
d1a29ca87d
commit
8d6136bcf3
@ -103,6 +103,8 @@ class MaterialManager(QObject):
|
||||
continue
|
||||
|
||||
root_material_id = material_metadata.get("base_file", "")
|
||||
if root_material_id not in material_metadatas: #Not a registered material profile. Don't store this in the look-up tables.
|
||||
continue
|
||||
if root_material_id not in self._material_group_map:
|
||||
self._material_group_map[root_material_id] = MaterialGroup(root_material_id, MaterialNode(material_metadatas[root_material_id]))
|
||||
self._material_group_map[root_material_id].is_read_only = self._container_registry.isReadOnly(root_material_id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user