Skip to content

Conversation

@chubakueno
Copy link
Contributor

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

@chubakueno chubakueno changed the title Fix connection aborted when panning DYN-9379: Fix connection aborted when panning Sep 25, 2025
Copy link

@github-actions github-actions bot left a 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

@johnpierson johnpierson requested a review from Copilot September 25, 2025 13:54
Copy link
Contributor

Copilot AI left a 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

@zeusongit zeusongit requested a review from a team September 25, 2025 15:03
Copy link
Member

@johnpierson johnpierson left a 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!

@chubakueno chubakueno merged commit 7818792 into DynamoDS:master Sep 25, 2025
26 of 31 checks passed
Comment on lines +953 to 956
if (!ViewModel.IsConnecting && ViewModel.IsPanning && e.MiddleButton == MouseButtonState.Released)
{
ViewModel.RequestTogglePanMode();
}
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@aparajit-pratap
Copy link
Contributor

@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?

@johnpierson
Copy link
Member

@aparajit-pratap added a test here: https://jira.autodesk.com/browse/DYN-9598

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.

4 participants