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

Unique selection (and forbid multiple selection) #183

Closed
arabine opened this issue Dec 13, 2022 · 4 comments
Closed

Unique selection (and forbid multiple selection) #183

arabine opened this issue Dec 13, 2022 · 4 comments
Assignees
Milestone

Comments

@arabine
Copy link

arabine commented Dec 13, 2022

Is it possible to select only one node and forbid the multiple selection? If not, I can develop a patch maybe?

@cneben
Copy link
Owner

cneben commented Dec 15, 2022

Hi @arabine, unfortunately, it is not possible for the moment since qan::Graph::SelectionPolicy only allow CTRL or no selection policies.
I am currently adding a qan::Graph::enableMultipleSelection settings to implement the desired behaviour, please follow the #183 mention on develop.

cneben added a commit that referenced this issue Dec 15, 2022
WIP.

Signed-off-by: cneben <benoit@destrat.io>
@cneben cneben self-assigned this Dec 15, 2022
@cneben cneben added this to the 2.2.0 milestone Dec 15, 2022
@cneben
Copy link
Owner

cneben commented Dec 15, 2022

  • Add multipleSelectionEnabled support to qan::Graph.
  • Modify the selection sample to demonstrate multipleSelectionEnabled.
  • Enforce policy for "window selection" (CTRL + drag). (See GraphView::selectionRectActivated(const QRectF& rect)).
  • Add documentation.

See selection sample:
image

@arabine I'am not really sure about the handling of selection rect (CTRL+click and drag), any suggestion would be welcome (perhaps it should be disabled with a property).

cneben added a commit that referenced this issue Dec 15, 2022
Signed-off-by: cneben <benoit@destrat.io>
cneben added a commit that referenced this issue Dec 15, 2022
Signed-off-by: cneben <benoit@destrat.io>
@arabine
Copy link
Author

arabine commented Jan 2, 2023

Ok saw it, wonderful. Maybe the selection rect should be disabled when the single selection is selected? (this is my case, we do not want selection rect).

@cneben
Copy link
Owner

cneben commented Nov 19, 2023

For future reference, selectionRectEnabled has been enabled on qan::Navigable the handle that case.

@cneben cneben closed this as completed Nov 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants