Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selecting multiple signal by swiping does not update plot #78

Open
giotherobot opened this issue Feb 2, 2024 · 3 comments
Open

Selecting multiple signal by swiping does not update plot #78

giotherobot opened this issue Feb 2, 2024 · 3 comments

Comments

@giotherobot
Copy link
Member

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
Copy link
Member Author

Kooha-2024-02-02-10-53-28.webm

@S-Dafarra
Copy link
Member

I wonder whether the signal is sent by Qt in this case.

You can try using itemSelectionChanged instead of itemClicked in

self.ui.variableTreeWidget.itemClicked.connect(self.variableTreeWidget_on_click)

Reference doc: https://doc.qt.io/qt-6/qtreewidget.html#itemSelectionChanged

@giotherobot
Copy link
Member Author

giotherobot commented Feb 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants