forked from M-Labs/artiq
1
0
Fork 0

moninj: consistent sort keys

This commit is contained in:
Simon Renblad 2024-05-02 14:10:47 +08:00
parent 1f228a500b
commit 4de9d292e0
1 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ class _TTLWidget(QtWidgets.QFrame):
self.programmatic_change = False
def sort_key(self):
return self.channel
return (0, self.channel, 0)
def uid(self):
return self.title
@ -317,7 +317,7 @@ class _DDSWidget(QtWidgets.QFrame):
self.value_edit.setText("{:.7f}".format(self.cur_frequency / 1e6))
def sort_key(self):
return (self.bus_channel, self.channel)
return (1, self.bus_channel, self.channel)
def uid(self):
return self.title
@ -358,7 +358,7 @@ class _DACWidget(QtWidgets.QFrame):
.format(self.cur_value * 100 / 2**16))
def sort_key(self):
return (self.spi_channel, self.channel)
return (2, self.spi_channel, self.channel)
def uid(self):
return (self.title, self.channel)