-
Notifications
You must be signed in to change notification settings - Fork 668
DYN-9379: Fix connection aborted when panning #16519
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9379
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a regression where connections were incorrectly aborted when the user panned using the middle mouse wheel. The fix prevents pan mode from being toggled when the user is actively connecting nodes.
- Added connection state checks to prevent pan mode interference during node connections
- Applied the fix to both mouse down and mouse release events for middle mouse button
johnpierson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. tested with a few different scenarios!
| if (!ViewModel.IsConnecting && ViewModel.IsPanning && e.MiddleButton == MouseButtonState.Released) | ||
| { | ||
| ViewModel.RequestTogglePanMode(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious how this worked before since this code looks like it was introduced only in 3.6 (seeing the PRs referenced in the description). Was there a call to RequestTogglePanMode elsewhere in the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Connecting mode allows for panning, but when you explicity request Panning mode, Panning mode does not allow for connection.
|
@jnealb is there a way to add UI tests (AGT Tests) for these behaviors (like zoom, pan, etc.) so we make sure such regressions don't reoccur in the future? |
|
@aparajit-pratap added a test here: https://jira.autodesk.com/browse/DYN-9598 |
Purpose
A regression was introduced in ticket #16285 which was based upon PR #15823 in which a connection was aborted when panning with the middle mouse wheel. This PR aims to fix such behavior.
Declarations
Check these if you believe they are true
Release Notes
Fix abortion of connection when panning with middle wheel.
Reviewers
@johnpierson
@reddyashish
FYIs
@dimven-adsk