waveform: fixes

This commit is contained in:
Simon Renblad 2024-01-17 16:57:14 +08:00
parent b870d23f13
commit 435af6daa6

View File

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