Call the save method on the CustomNodeWorkspaceModel, when the custom node is being saved.#12687
Merged
QilongTang merged 3 commits intoDynamoDS:masterfrom Mar 11, 2022
Merged
Conversation
QilongTang
approved these changes
Mar 11, 2022
Contributor
|
Would you fillin the release notes? |
Contributor
|
I think there are a couple regressions to look at |
Collaborator
Author
|
Looking into it. |
Collaborator
Author
|
The build has been unstable, couldn't find any failures. |
Collaborator
Author
|
@QilongTang Fixed the tests. I was using the local variable "currentWorkspaceViewModel" by mistake, which was null in some cases |
Collaborator
Author
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This PR is to fix the: https://jira.autodesk.com/browse/DYN-4460.
When a new custom node is created and saved to a local path in a dynamo session, the custom node manager doesn't have the path information for that particular custom node. It will only have the path information after dynamo is restarted because Dynamo tries to load all the definitions from the node package paths. This was happening because when the CN is saved, during the InternalSaveAs method in dynamo view model, the workspace model's save function is always called.
This save method on the CustomNodeWorkspaceModel model is never called: https://github.com/DynamoDS/Dynamo/blob/master/src/DynamoCore/Graph/Workspaces/CustomNodeWorkspaceModel.cs#L298. When the custom node workspace is being saved, this method has to be called and that will make sure that the path information is updated in the custom node manager.
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Call the save method on the CustomNodeWorkspaceModel, when the custom node is being saved.
Reviewers
@QilongTang @mjkkirschner @zeusongit