-
-
Notifications
You must be signed in to change notification settings - Fork 577
Insert point on segment by clicking once (no more sliding) and Alt+click to delete a segment #2495
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
Insert point on segment by clicking once (no more sliding) and Alt+click to delete a segment #2495
Conversation
!build |
|
This don't seem to be acting on a very reliable basis: https://files.keavon.com/-/IntrepidWhichAndeancondor/capture_4_.mp4 Please also make the size of the line and X visualization configurable in consts.rs. |
aa7ff13
to
e11b57a
Compare
Moved the constants to consts.rs and also increased the tolerance so that it moves to insertion mode better. It seems to be unreliable because the size of overlay was more than the tolerance. |
!build |
|
It looks like this currently "enters a mode" when the mouse gets nearby and that mode can be exited by right clicking/hitting escape. And it affects the hints bar by removing everything else from it. And it stays in the mode until the user moves their cursor far enough away to "break free" from it. Some of this is likely a holdover from the previous behavior (what's in master currently). The desired new behavior is just showing that insertion line whenever you're within X distance of any segment (and the nearest segment if within X distance of multiple segments). And no change to the hints bar from the normal mode. Thanks :) |
Yes previous implementation used a new state when the clicked near the segment and then clicking again inserts the point, so I just changed that so that when pointer is moved closer to a segment compared to a threshold then it goes into that mode. I think that going into a separate state for inserting point prevents its collision with other features of the path tool. So should I change that it doesn't goes into a new mode? |
I think this will be the cleanest and most robust approach, yes. |
!build |
|
We still have unpredictable behavior with mouse proximity that I assume is left over still from the previous approach of being a tool state: capture_9_.mp4 |
I've also updated the request for deletion to use Alt instead of Ctrl, so please change that accordingly. Thanks! |
That unusual behaviour was due to wrong logic of computing if the mouse is too far from the segment. I have fixed it. |
!build |
|
1521530
to
eb12696
Compare
There are portions of most segments where it just isn't valid: capture_99_.mp4Here's that layer so you can try it on your own:
I'm going to merge this since it's useful to have the feature, despite the bug. But I hope you can try debugging and fixing that ASAP. Thanks. |
Part of #1870