forked from M-Labs/artiq
1
0
Fork 0

big_number: refactor data_changed

This commit is contained in:
Simon Renblad 2023-07-12 12:03:29 +08:00 committed by Sébastien Bourdeauducq
parent 5695e9f77e
commit 25959d0cd6
1 changed files with 2 additions and 2 deletions

View File

@ -61,9 +61,9 @@ class NumberWidget(QtWidgets.QStackedWidget):
def cancel_edit(self):
self.setCurrentWidget(self.lcd_widget)
def data_changed(self, data, mods):
def data_changed(self, value, metadata, persist, mods):
try:
n = float(data[self.dataset_name][1])
n = float(value[self.dataset_name])
except (KeyError, ValueError, TypeError):
n = "---"
self.lcd_widget.display(n)