Skip to content
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

DYN-7523: editwindow fix #15615

Merged

Conversation

dnenov
Copy link
Collaborator

@dnenov dnenov commented Nov 6, 2024

Purpose

This is a follow up on #15583 which was recently merged. I am addressing potential leak introduced in the previous PR by introducing anonymous event subscription. The fix is mainly making these explicit, and unsubscribing immediately after the first call. This should ensure no unsubscribed events remain after the window is closed.

Also, removed a small bit of unnecessary test code that was accidentally left over.

Tagging this PR with the old Jira issue.

UI Changes

DynamoSandbox_EW2dZXsRDJ

Declarations

Check these if you believe they are true

  • The codebase is in a better state after this PR
  • Is documented according to the standards
  • The level of testing this PR includes is appropriate
  • User facing strings, if any, are extracted into *.resx files
  • All tests pass using the self-service CI.
  • Snapshot of UI changes, if any.
  • Changes to the API follow Semantic Versioning and are documented in the API Changes document.
  • This PR modifies some build requirements and the readme is updated
  • This PR contains no files larger than 50 MB

Release Notes

  • removed anonymous subscription
  • immediately unsubscribe after calling the event to prevent leaking
  • removed redundant test code

Reviewers

@reddyashish
@zeusongit
@QilongTang

FYIs

(FILL ME IN, Optional) Names of anyone else you wish to be notified of

- removed anonymous subscription
- immediately unsubscribe after calling the event to prevent leaking
- removed redundant test code
@github-actions github-actions bot changed the title editwindow fix DYN-7523: editwindow fix Nov 6, 2024
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-7523

- added comments
}

// Centralize the window correctly after it is rendered
private void OnContentRendered(object sender, EventArgs e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is subscribed in the editwindow fn but when is it being called?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is the very last event to be called when a Window is placed. It is called even after Loaded. I use it to re-centralize the window as there is something else affecting it externally, which I cannot catch.

Copy link

github-actions bot commented Nov 6, 2024

UI Smoke Tests

Test: success. 11 passed, 0 failed.
TestComplete Test Result
Workflow Run: UI Smoke Tests
Check: UI Smoke Tests

@reddyashish reddyashish merged commit 7f40772 into DynamoDS:master Nov 7, 2024
32 checks passed
reddyashish pushed a commit to reddyashish/Dynamo that referenced this pull request Nov 7, 2024
@reddyashish reddyashish mentioned this pull request Nov 7, 2024
9 tasks
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.

2 participants