From 9e6b54a7dfbd58ee043a8d521477c38c2cfd762b Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Mon, 15 Jan 2024 16:17:42 +0800 Subject: [PATCH] waveform: fix Model.update --- artiq/dashboard/waveform.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/artiq/dashboard/waveform.py b/artiq/dashboard/waveform.py index ab7f548e5..43d8e7b2b 100644 --- a/artiq/dashboard/waveform.py +++ b/artiq/dashboard/waveform.py @@ -39,8 +39,7 @@ class Model(DictSyncTreeSepModel): self._del_item(self, k.split(self.separator)) self.backing_store.clear() - def update_from_dict(self, d): - self.clear() + def update(self, d): for k, v in d.items(): self[k] = v @@ -851,7 +850,8 @@ class WaveformDock(QtWidgets.QDockWidget): def _process_ddb(self): addr = None channel_list = comm_analyzer.get_channel_list(self._ddb) - self._channel_model.update_from_dict(channel_list) + self._channel_model.clear() + self._channel_model.update(channel_list) for name, desc in self._ddb.items(): if name == "core_analyzer": logger.info("coreanalyzer exists")