-
Notifications
You must be signed in to change notification settings - Fork 511
selection of entities for dragging is too greedy #161
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
Comments
@whitequark, updated here |
@Evil-Spirit But not the first bug, no? |
@whitequark, not yet. |
@Evil-Spirit Another bug with dragging: |
@whitequark, Unfortunately I can't open this file (packed filesize is zero). Could you reattach please? |
@whitequark,
|
@Evil-Spirit OK, I'll think more about it too. |
The logic to fix this might be something like: The challenge is "noticeably closer". Dragging items from an underlying sketch is great but often involves something directly under something in the current group. We can restructure my proposed fix for #174 to allow this but the criteria for "noticeably" will need some help/thought. |
I created an issue161 branch off my issue174 branch which almost includes a fix for this on top of the other ones. There is a line which needs the criteria for prioritizing the item that selection would use over an item from a previous group. Right now that line reads:
If you can define "static item is obviously closer to the mouse than the other one" and drop that condition in that line it should fix this issue while leaving the previous fix intact. Remember, dragging uses the same picking logic as selection except that it prioritizes items from previous groups. But to fix this we need an exception to the exception in order to prioritize the normal selection. If the two points are on top of each other we want to prioritize the one from a prior group for dragging. This is splitting hairs. This really is a corner case ;-)
|
I have a feeling the issue here is much deeper. The goal is not so much to prioritize move entities in earlier groups is it? The normal selection logic allows picking things from any group. Isn't the real goal something like "move the earliest (in group order) item that is linked to and will end up moving the thing I'm hovering over"? That is a very complex thing to get right and the code to do it thus far is very simplistic, though I think with the 174 fix it's rather effective. |
Open the attached file:

bug.zip
Rotate to the following view and position the cursor as follows:
Drag with mouse. Both points will get dragged.
As a bonus I once got this crash:
but have no real way to reproduce it except by randomly dragging.
The text was updated successfully, but these errors were encountered: