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

SelectionBox: Fixed the offset on the selection box highlight appearing in the Graph Editor when dragging to select Nodes #2647

Merged
merged 1 commit into from
Jan 15, 2025

Conversation

waaake
Copy link
Contributor

@waaake waaake commented Jan 15, 2025

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

  • Fix Selection Offset for Selection Box.

Implementation remarks

The mouseArea's drag.smoothed attribute controls when the target moves to the mouse position, setting the value as true 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, the drag.smoothed property is restored to the original value.

@waaake waaake self-assigned this Jan 15, 2025
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.93%. Comparing base (3e8b736) to head (bf857bc).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2647   +/-   ##
========================================
  Coverage    69.93%   69.93%           
========================================
  Files          121      121           
  Lines         7088     7088           
========================================
  Hits          4957     4957           
  Misses        2131     2131           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

… to false when the selection is started

Setting the drag.smoothed to false ensures that the target will be moved straight to the current mouse position
@waaake waaake force-pushed the fix/SelectionHighlightOffset branch from cdad661 to bf857bc Compare January 15, 2025 10:51
@yann-lty yann-lty merged commit 5330bf8 into develop Jan 15, 2025
5 checks passed
@yann-lty yann-lty deleted the fix/SelectionHighlightOffset branch January 15, 2025 22:00
@cbentejac cbentejac added this to the Meshroom 2025.1.0 milestone Jan 17, 2025
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.

3 participants