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

Add multi selection by click and drag #684

Merged
merged 7 commits into from
Dec 31, 2021

Conversation

giacomoalbe
Copy link
Contributor

@giacomoalbe giacomoalbe commented Dec 28, 2021

Summary / How this PR fixes the problem?

This PR handles click and drag multi selection, both inside artboard and outside (on freeitems).

It does create a new mode and a new ViewLayer.

Inside test is performed on item's bound. This needs to be completely included inside the selection bound.
Partial bound inclusion yields no selection.

Steps to Test

  • Create some freeitems or some items inside an artboard
  • Click on an empty area on the canvas
  • Drag to include the items you'd like to select

Screenshots

click_drag_multi_select.mp4

Known Issues / Things To Do

  • I don't know if ViewLayers and Mode are coded in the right way, please enlight me :)

@giacomoalbe giacomoalbe self-assigned this Dec 28, 2021
@giacomoalbe giacomoalbe added this to the v0.1.0 milestone Dec 28, 2021
Copy link
Member

@Alecaddd Alecaddd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a segfault whenever I create an artboard and then select and empty area.

One thing that would be great to have is a live indicator of which items will be included in the selection.
Something like an "hover effect" around the items included in the selection area.
It could be done in a follow up PR.

@giacomoalbe
Copy link
Contributor Author

There's a segfault whenever I create an artboard and then select and empty area.

Ok I fixed the issue in the last commit.

One thing that would be great to have is a live indicator of which items will be included in the selection. Something like an "hover effect" around the items included in the selection area. It could be done in a follow up PR.

Yes, this would be nice. And I also think it should be done in another PR :)

This should be ready to be merged!

@giacomoalbe giacomoalbe requested a review from Alecaddd December 29, 2021 14:15
src/Lib/Managers/NobManager.vala Outdated Show resolved Hide resolved
src/Lib/Modes/MultiSelectMode.vala Show resolved Hide resolved
src/Lib/Modes/MultiSelectMode.vala Show resolved Hide resolved
@giacomoalbe giacomoalbe requested a review from mbfraga December 30, 2021 18:15
@Alecaddd Alecaddd merged commit 7355470 into akiraux:main Dec 31, 2021
@Alecaddd Alecaddd mentioned this pull request Dec 31, 2021
46 tasks
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

Successfully merging this pull request may close these issues.

4 participants