robot-log-visualizer icon indicating copy to clipboard operation
robot-log-visualizer copied to clipboard

Selecting multiple signal by swiping does not update plot

Open giotherobot opened this issue 1 year ago • 3 comments

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.

giotherobot avatar Feb 02 '24 09:02 giotherobot

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

S-Dafarra avatar Feb 13 '24 11:02 S-Dafarra

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.

giotherobot avatar Feb 16 '24 15:02 giotherobot