From 435af6daa64ba690836b52527e2036eed8252f34 Mon Sep 17 00:00:00 2001 From: Simon Renblad Date: Wed, 17 Jan 2024 16:57:14 +0800 Subject: [PATCH] waveform: fixes --- artiq/dashboard/waveform.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/artiq/dashboard/waveform.py b/artiq/dashboard/waveform.py index 24cc0e3bd..989c4702d 100644 --- a/artiq/dashboard/waveform.py +++ b/artiq/dashboard/waveform.py @@ -512,11 +512,11 @@ class _WaveformView(QtWidgets.QWidget): self._splitter.setMaximumHeight(Waveform.MAX_HEIGHT * self._model.rowCount()) -class _WaveformModel(QtWidgets.QAbstractTableModel): +class _WaveformModel(QtCore.QAbstractTableModel): def __init__(self): self.backing_struct = [] self.headers = ["name", "type", "width", "data"] - QtWidgets.QAbstractTableModel.__init__(self) + QtCore.QAbstractTableModel.__init__(self) def rowCount(self): return len(self.backing_struct) @@ -594,8 +594,7 @@ class WaveformArea(QtWidgets.QWidget): scroll_area.setFrameShape(QtWidgets.QFrame.NoFrame) layout.addWidget(scroll_area) - # TODO: name changed to VDragDropSplitter - self._splitter = DragDropSplitter(parent=scroll_area) + self._splitter = VDragDropSplitter(parent=scroll_area) self._splitter.setHandleWidth(1) scroll_area.setWidget(self._splitter) @@ -856,8 +855,7 @@ class WaveformDock(QtWidgets.QDockWidget): self._file_menu.addAction(action) def _update_log_channels(self): - for log in self._state['logs']: - self._channel_model[log] = (0, WaveformType.LOG) + self._channel_model.update(self._state['logs']) def on_dump_receive(self, data): decoded_dump = comm_analyzer.decode_dump(data)