mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Fix material manager to use dict as a fallback
CURA-5266
This commit is contained in:
parent
54c32c52f6
commit
f62ce1966b
1 changed files with 1 additions and 1 deletions
|
@ -236,7 +236,7 @@ class MaterialManager(QObject):
|
|||
return self._material_group_map.get(root_material_id)
|
||||
|
||||
def getRootMaterialIDForDiameter(self, root_material_id: str, approximate_diameter: str) -> str:
|
||||
return self._material_diameter_map.get(root_material_id).get(approximate_diameter, root_material_id)
|
||||
return self._material_diameter_map.get(root_material_id, {}).get(approximate_diameter, root_material_id)
|
||||
|
||||
def getRootMaterialIDWithoutDiameter(self, root_material_id: str) -> str:
|
||||
return self._diameter_material_map.get(root_material_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue