From 25959d0cd6fc01536064af48822207ffad3e8684 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Wed, 12 Jul 2023 12:03:29 +0800 Subject: [PATCH] big_number: refactor data_changed --- artiq/applets/big_number.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/applets/big_number.py b/artiq/applets/big_number.py index d18b4f601..a085ce8e4 100755 --- a/artiq/applets/big_number.py +++ b/artiq/applets/big_number.py @@ -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)