mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 06:27:26 -06:00
Fix sorting of settings on Profile manager page
CURA-2123
This commit is contained in:
parent
dbaa6190be
commit
b7b0faf44a
2 changed files with 4 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -197,7 +197,9 @@ UM.ManagementPage
|
|||
anchors.bottom: parent.bottom
|
||||
|
||||
ListView {
|
||||
model: Cura.ContainerSettingsModel{ containers:
|
||||
model: Cura.ContainerSettingsModel
|
||||
{
|
||||
containers:
|
||||
{
|
||||
if (!currentItem) {
|
||||
return []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue