robot-log-visualizer
robot-log-visualizer copied to clipboard
Selecting multiple signal by swiping does not update plot
I was trying to select multiple signals at the same time by dragging the mouse on the signal list. This works in the sense that I can see the selection happen in the signal list (the signals get highlited), but the plot does not seem to update until a single signal gets selected/deselected.
I wonder whether the signal is sent by Qt in this case.
You can try using itemSelectionChanged
instead of itemClicked
in https://github.com/ami-iit/robot-log-visualizer/blob/996e0d4f22aa48eb2a7b41dc9133115f9494a8f1/robot_log_visualizer/ui/gui.py#L201
Reference doc: https://doc.qt.io/qt-6/qtreewidget.html#itemSelectionChanged
Sadly it is not as easy as a simple signal swap, I tried but the selection mechanism breaks when there are multiple plots:
Traceback (most recent call last):
File "/home/giovannif/robot-log-visualizer/robot_log_visualizer/ui/gui.py", line 483, in plotTabBar_currentChanged
for active_path_str in self.plot_items[index].canvas.active_paths.keys():
RuntimeError: dictionary changed size during iteration
With a single plot it works fine.