Consolidate models some more

Contributes to CURA-5162, CURA-5378
This commit is contained in:
Ian Paschal 2018-08-23 16:58:23 +02:00
parent 56a5f59964
commit 6be9b5e27f
4 changed files with 44 additions and 56 deletions

View file

@ -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