forked from M-Labs/artiq
moninj: consistent sort_keys
This commit is contained in:
parent
aeaa337b1a
commit
648d7a3d87
|
@ -158,7 +158,7 @@ class _TTLHandler:
|
|||
self.refresh_display()
|
||||
|
||||
def sort_key(self):
|
||||
return self.channel
|
||||
return (0, self.channel, 0)
|
||||
|
||||
|
||||
class _DDSWidget(QtWidgets.QFrame):
|
||||
|
@ -354,7 +354,7 @@ class _DDSHandler:
|
|||
self.dm.dds_channel_toggle(self.dds_name, sw=False)
|
||||
|
||||
def sort_key(self):
|
||||
return (self.bus_channel, self.channel)
|
||||
return (1, self.bus_channel, self.channel)
|
||||
|
||||
|
||||
class _DACWidget(QtWidgets.QFrame):
|
||||
|
@ -407,7 +407,7 @@ class _DACHandler:
|
|||
self.widget.set_value(self.cur_value * 100 / 2**16)
|
||||
|
||||
def sort_key(self):
|
||||
return (self.spi_channel, self.channel)
|
||||
return (2, self.spi_channel, self.channel)
|
||||
|
||||
|
||||
_HandlerDesc = namedtuple("_HandlerDesc", "uid comment cls arguments")
|
||||
|
|
Loading…
Reference in New Issue