From 7e8eb2044afc1c374d10353a78ea2b774fccdbcf Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 9 Aug 2016 15:19:58 +0200 Subject: [PATCH] Sort list of discovered printers CURA-2035 --- DiscoverUM3Action.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DiscoverUM3Action.py b/DiscoverUM3Action.py index c24f90674f..fc895a78ff 100644 --- a/DiscoverUM3Action.py +++ b/DiscoverUM3Action.py @@ -33,8 +33,9 @@ class DiscoverUM3Action(MachineAction): @pyqtProperty("QVariantList", notify = printersChanged) def foundDevices(self): if self._network_plugin: - printers = self._network_plugin.getPrinters() - return list(printers.values()) + printers = list(self._network_plugin.getPrinters().values()) + printers.sort(key = lambda k: k.name) + return printers else: return []