SelectionBox: Fixed the offset on the selection box highlight appearing in the Graph Editor when dragging to select Nodes #2647
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses an issue with the offset during clicking and dragging on the Graph Editor to invoke the selection box for selecting Edges.
As seen in many cases, the selection box bounds have an offset from the current position of the mouse and this offset remains consistent when moving from left to right and then right to left, causing the user some difficulty in precision of the Selection.
Features list
Implementation remarks
The mouseArea's
drag.smoothed
attribute controls when the target moves to the mouse position, setting the value astrue
which is default makes the target move only after the drag has started causing a slight offset which is noticable.Whereas setting the property to be
false
ensures that the target will be moved straight to the current mouse position.The proposed implementation considers and saves the existing value of the
drag.smoothed
property, sets the value of the property as false when the selection starts and upon selection end, thedrag.smoothed
property is restored to the original value.