mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 17:25:56 +08:00
Fix material manager to use dict as a fallback
CURA-5266
This commit is contained in:
parent
54c32c52f6
commit
f62ce1966b
@ -236,7 +236,7 @@ class MaterialManager(QObject):
|
|||||||
return self._material_group_map.get(root_material_id)
|
return self._material_group_map.get(root_material_id)
|
||||||
|
|
||||||
def getRootMaterialIDForDiameter(self, root_material_id: str, approximate_diameter: str) -> str:
|
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:
|
def getRootMaterialIDWithoutDiameter(self, root_material_id: str) -> str:
|
||||||
return self._diameter_material_map.get(root_material_id)
|
return self._diameter_material_map.get(root_material_id)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user