DYN-9428 - Update DNA Method Calls#16474
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes an issue in the node auto-complete functionality by updating method calls to include the DynamoViewModel parameter. The changes ensure that the correct dispatcher is used for UI operations when performing auto-layout of nodes.
Key changes:
- Updated
PostAutoLayoutNodesmethod signature to accept aDynamoViewModelparameter - Modified dispatcher usage to use
dynamoViewModel.UIDispatcherwith a fallback toDispatcher.CurrentDispatcher - Updated all call sites to pass the required
DynamoViewModelparameter
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| NodeAutoCompleteBarViewModel.cs | Updated two call sites to pass dynamoViewModel parameter to PostAutoLayoutNodes |
| NodeSearchElementViewModel.cs | Updated call site to pass dynamoViewModel parameter to PostAutoLayoutNodes |
| NodeAutoCompleteUtilities.cs | Modified PostAutoLayoutNodes method signature and dispatcher logic to use DynamoViewModel parameter |
Comments suppressed due to low confidence (1)
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-9428
| var dispatcher = dynamoViewModel?.UIDispatcher ?? Dispatcher.CurrentDispatcher; | ||
|
|
||
|
|
||
| dispatcher.BeginInvoke(() => AutoLayoutNodes(wsModel, |
There was a problem hiding this comment.
check for null dispatcher ?
|
Looks like there are some issues with the build pipeline but the changes look good. |
There is an extra closing bracket: https://github.com/DynamoDS/Dynamo/pull/16474/files#diff-e2a8ce0fd709d6521edd885285079f90716d49664c05ed3cc09230b22399c8a8R38 |
|
Fixed the extra }, but now the build is failing because of some public api deprecations, so I think I fixed those @zeusongit |
Co-authored-by: Copilot <[email protected]>
Purpose
This PR fixes an issue in the node auto-complete functionality by updating method calls to include the DynamoViewModel parameter. The changes ensure that the correct dispatcher is used for UI operations when performing auto-layout of nodes.
Key changes:
Updated PostAutoLayoutNodes method signature to accept a DynamoViewModel parameter
Modified dispatcher usage to use dynamoViewModel.UIDispatcher with a fallback to Dispatcher.CurrentDispatcher
Updated all call sites to pass the required DynamoViewModel parameter
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Fixed an issue with node auto-complete by updating method calls to include the DynamoViewModel parameter, ensuring the correct UI dispatcher is used during node auto-layout.
Reviewers
@DynamoDS/synapse
FYIs
@zeusongit