From ab0cef95e8645f1c237c1b7194f57e5d52c1b181 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Wed, 1 May 2019 14:38:55 +0200 Subject: [PATCH] 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/ --- cura/Machines/Models/GlobalStacksModel.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Machines/Models/GlobalStacksModel.py b/cura/Machines/Models/GlobalStacksModel.py index f15fe1878b..707d71be97 100644 --- a/cura/Machines/Models/GlobalStacksModel.py +++ b/cura/Machines/Models/GlobalStacksModel.py @@ -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)