Sort unique printer types

So that they appear in a consistent order everywhere.
This commit is contained in:
Ghostkeeper 2018-12-19 13:03:59 +01:00
parent 08c736f770
commit a5134001e9
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -230,7 +230,7 @@ class PrinterOutputDevice(QObject, OutputDevice):
# Returns the unique configurations of the printers within this output device
@pyqtProperty("QStringList", notify = uniqueConfigurationsChanged)
def uniquePrinterTypes(self) -> List[str]:
return list(set([configuration.printerType for configuration in self._unique_configurations]))
return list(sorted(set([configuration.printerType for configuration in self._unique_configurations])))
def _onPrintersChanged(self) -> None:
for printer in self._printers: