waveform: fix Model.update

This commit is contained in:
Simon Renblad 2024-01-15 16:17:42 +08:00
parent f65d6e83dc
commit 9e6b54a7df

View File

@ -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")