mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
Sort list of discovered printers
CURA-2035
This commit is contained in:
parent
7f83c22f74
commit
7e8eb2044a
1 changed files with 3 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue