Sort materials by brand, material, name, color_name.

Contributes to issue CURA-4243.
This commit is contained in:
Jack Ha 2017-12-04 13:23:30 +01:00
parent 44537c4ef4
commit ac97d0d83f

View file

@ -29,5 +29,8 @@ class MaterialsModel(InstanceContainersModel):
def _sortKey(self, item) -> List[Any]:
result = []
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))
return result