DYN-9379: Fix connection aborted when panning#16519
DYN-9379: Fix connection aborted when panning#16519chubakueno merged 1 commit intoDynamoDS:masterfrom
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9379
There was a problem hiding this comment.
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.
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.
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.
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? |
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