DYN-8307: Remove unused code for Port cursor#16311
Merged
zeusongit merged 1 commit intoDynamoDS:masterfrom Jun 18, 2025
Merged
Conversation
There was a problem hiding this comment.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-8307
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR removes legacy port-hover cursor logic to streamline mouse movement handling and improve performance.
- Deletes the idle-state hit-test block that set the cursor when hovering over input ports.
- Removes associated helper methods (
PortFromHitTestResult,ElementUnderMouseCursor,DirectHitTestCallback) and related cursor-setting code.
Comments suppressed due to low confidence (2)
src/DynamoCoreWpf/Views/Core/WorkspaceView.xaml.cs:873
- [nitpick] With the port-hover cursor logic removed, it would be helpful to add tests verifying that the cursor state remains correct during various mouse movements and workspace states to prevent regressions.
// If selection is going to be dragged and ctrl is pressed.
| PortViewModel pvm = PortFromHitTestResult(dependencyObject); | ||
|
|
||
| if (null != pvm && (pvm.PortType == PortType.Input)) | ||
| this.Cursor = CursorLibrary.GetCursor(CursorSet.ArcSelect); |
Contributor
There was a problem hiding this comment.
What does this cursor look like? Is there a png (image file) resource for the cursor that also needs to be removed?
Contributor
Author
aparajit-pratap
approved these changes
Jun 18, 2025
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
Based on the Reope PR: #15825
See original PR's description for a detailed summary.
TLDR; Removing some code from MouseMove event which used to trigger when mouse hover over the input port, at which point the cursor should have been changed to
CursorSet.ArcSelect. But this have not been working since Notes were introduced (May 2023). IMO it is better to go away with it and gain some performance instead.I tried to quantify the gain but it is hard, I tried to capture the amount of processing time spent inside the code while simply hovering over a huge graph, for a difference in CPU usage you can look at the screenshots on the original PR.
(I did see minor gains when selecting nodes in the workspace after this fix)
Declarations
Check these if you believe they are true
*.resxfilesRelease Notes
Remove unused code for Port cursor
Reviewers