mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Consolidate models some more
Contributes to CURA-5162, CURA-5378
This commit is contained in:
parent
56a5f59964
commit
6be9b5e27f
4 changed files with 44 additions and 56 deletions
|
@ -34,18 +34,7 @@ class FavoriteMaterialsModel(BaseMaterialsModel):
|
|||
if root_material_id not in self._favorite_ids:
|
||||
continue
|
||||
|
||||
item = {
|
||||
"root_material_id": root_material_id,
|
||||
"id": metadata["id"],
|
||||
"GUID": metadata["GUID"],
|
||||
"name": metadata["name"],
|
||||
"brand": metadata["brand"],
|
||||
"material": metadata["material"],
|
||||
"color_name": metadata["color_name"],
|
||||
"color_code": metadata["color_code"],
|
||||
"container_node": container_node,
|
||||
"is_favorite": True # Don't need to set since we only include favorites anyway
|
||||
}
|
||||
item = self._createMaterialItem(root_material_id, container_node)
|
||||
item_list.append(item)
|
||||
|
||||
# Sort the item list alphabetically by name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue