Fix sorting of settings on Profile manager page

CURA-2123
This commit is contained in:
fieldOfView 2016-08-15 15:17:59 +02:00
parent dbaa6190be
commit b7b0faf44a
2 changed files with 4 additions and 2 deletions

View file

@ -41,7 +41,6 @@ class ContainerSettingsModel(ListModel):
keys = keys + list(container.getAllKeys())
keys = list(set(keys)) # remove duplicate keys
keys.sort()
for key in keys:
definition = None
@ -72,6 +71,7 @@ class ContainerSettingsModel(ListModel):
"unit": definition.unit,
"category": category.label
})
self.sort(lambda k: (k["category"], k["key"]))
## Set the ids of the containers which have the settings this model should list.
# Also makes sure the model updates when the containers have property changes

View file

@ -197,7 +197,9 @@ UM.ManagementPage
anchors.bottom: parent.bottom
ListView {
model: Cura.ContainerSettingsModel{ containers:
model: Cura.ContainerSettingsModel
{
containers:
{
if (!currentItem) {
return []