mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
1 changed files with 2 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue