From 4de9d292e05cd43c10275b433ee13a53f62a7002 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Thu, 2 May 2024 14:10:47 +0800 Subject: [PATCH] moninj: consistent sort keys --- artiq/dashboard/moninj.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/dashboard/moninj.py b/artiq/dashboard/moninj.py index 375a31341..ef6171f94 100644 --- a/artiq/dashboard/moninj.py +++ b/artiq/dashboard/moninj.py @@ -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)