mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Sort materials by brand, material, name, color_name.
Contributes to issue CURA-4243.
This commit is contained in:
parent
44537c4ef4
commit
ac97d0d83f
1 changed files with 3 additions and 0 deletions
|
@ -29,5 +29,8 @@ class MaterialsModel(InstanceContainersModel):
|
||||||
def _sortKey(self, item) -> List[Any]:
|
def _sortKey(self, item) -> List[Any]:
|
||||||
result = []
|
result = []
|
||||||
result.append(item["metadata"]["brand"])
|
result.append(item["metadata"]["brand"])
|
||||||
|
result.append(item["metadata"]["material"])
|
||||||
|
result.append(item["metadata"]["name"])
|
||||||
|
result.append(item["metadata"]["color_name"])
|
||||||
result.extend(super()._sortKey(item))
|
result.extend(super()._sortKey(item))
|
||||||
return result
|
return result
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue