mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 21:57:23 +08:00
Sort list of discovered printers
CURA-2035
This commit is contained in:
parent
7f83c22f74
commit
7e8eb2044a
@ -33,8 +33,9 @@ class DiscoverUM3Action(MachineAction):
|
|||||||
@pyqtProperty("QVariantList", notify = printersChanged)
|
@pyqtProperty("QVariantList", notify = printersChanged)
|
||||||
def foundDevices(self):
|
def foundDevices(self):
|
||||||
if self._network_plugin:
|
if self._network_plugin:
|
||||||
printers = self._network_plugin.getPrinters()
|
printers = list(self._network_plugin.getPrinters().values())
|
||||||
return list(printers.values())
|
printers.sort(key = lambda k: k.name)
|
||||||
|
return printers
|
||||||
else:
|
else:
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user