Skip to content

Fix issue161 and 174. Use the same logic for selction and dragging, b…#672

Merged
phkahler merged 1 commit intosolvespace:masterfrom
phkahler:issue161
Aug 9, 2020
Merged

Fix issue161 and 174. Use the same logic for selction and dragging, b…#672
phkahler merged 1 commit intosolvespace:masterfrom
phkahler:issue161

Conversation

@phkahler
Copy link
Member

@phkahler phkahler commented Aug 7, 2020

This would be used instead of PR #658 because it fixes both issues while preserving the ability to drag underlying sketch points.

@phkahler
Copy link
Member Author

phkahler commented Aug 7, 2020

This does not work as well as current master for dragging lines in the underlying sketch. We could probably expand the idea to cover those (line with an immovable point could be skipped maybe?). Might need some refactoring too. Just want to know if this heading in the right direction and how far to go with it.

@phkahler
Copy link
Member Author

phkahler commented Aug 8, 2020

The latest version of this splits the draggability decision out into a funtion EntityBase::CanBeDragged(). Points, Lines, Arcs, and Beziers can all be dragged in an underlying sketch if they are not fully constrained.

This particular issue with drag being greedy is resolved by dragging whichever point hover/select would have picked. In this case neither of those points is considered "undraggable" so whichever one is hovered/highlighted will be the one selected for dragging.

@whitequark
Copy link
Contributor

This should probably live in Entity, not EntityBase, since it is an UI concern.

…ut ignore entites that are inherently undraggable.

This allows the selection to reach through entities to their corresponding ones on the underlying sketch which can be dragged if they are not fully constrained. This is decided in a new function Entity::CanBeDragged().
@phkahler
Copy link
Member Author

phkahler commented Aug 8, 2020

Moved it. Also added circles to the list because they weren't resizing in the base sketch when dragged.

@whitequark
Copy link
Contributor

@phkahler I just tested this PR and this is an excellent solution to several longstanding issues. Thank you!

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.

if a constraint is selected, prioritize it for starting a drag selection of entities for dragging is too greedy

2 participants