mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-17 03:37:48 -06:00
Disable material if not compatible
Similar to how it's displayed in the printer. Contributes to issue CURA-5460.
This commit is contained in:
parent
16226bdd48
commit
c0fc0a7eba
5 changed files with 12 additions and 7 deletions
|
@ -19,7 +19,7 @@ class GenericMaterialsModel(BaseMaterialsModel):
|
|||
self._material_manager.materialsUpdated.connect(self._update) #Update when the list of materials changes.
|
||||
self._update()
|
||||
|
||||
def _update(self):
|
||||
def _update(self) -> None:
|
||||
Logger.log("d", "Updating {model_class_name}.".format(model_class_name = self.__class__.__name__))
|
||||
|
||||
global_stack = self._machine_manager.activeMachine
|
||||
|
@ -51,7 +51,8 @@ class GenericMaterialsModel(BaseMaterialsModel):
|
|||
"brand": metadata["brand"],
|
||||
"material": metadata["material"],
|
||||
"color_name": metadata["color_name"],
|
||||
"container_node": container_node
|
||||
"container_node": container_node,
|
||||
"compatible": metadata.get("compatible", "unknown")
|
||||
}
|
||||
item_list.append(item)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue