Sort secondarily by printer name

Makes it a bit easier to find printers.

Implements a suggestion from Reddit: https://www.reddit.com/r/ultimaker/comments/bj0txe/any_way_to_have_the_printers_sorted_on/
This commit is contained in:
Ghostkeeper 2019-05-01 14:38:55 +02:00
parent e750315708
commit ab0cef95e8
No known key found for this signature in database
GPG Key ID: 86BEF881AE2CF276

View File

@ -73,5 +73,5 @@ class GlobalStacksModel(ListModel):
"hasRemoteConnection": has_remote_connection,
"metadata": container_stack.getMetaData().copy(),
"discoverySource": section_name})
items.sort(key = lambda i: not i["hasRemoteConnection"])
items.sort(key = lambda i: (not i["hasRemoteConnection"], i["name"]))
self.setItems(items)