Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 0 additions & 45 deletions src/DynamoCoreWpf/Views/Core/WorkspaceView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -870,22 +870,6 @@ private void OnMouseMove(object sender, MouseEventArgs e)
ViewModel.CurrentCursor = CursorLibrary.GetCursor(CursorSet.ArcSelect);
}

if (ViewModel.IsInIdleState)
{
// Find the dependency object directly under the mouse
// cursor, then see if it represents a port. If it does,
// then determine its type, we would like to show the
// "ArcRemoving" cursor when the mouse is over an out port.
Point mouse = e.GetPosition((UIElement)sender);
var dependencyObject = ElementUnderMouseCursor(mouse);
PortViewModel pvm = PortFromHitTestResult(dependencyObject);

if (null != pvm && (pvm.PortType == PortType.Input))
this.Cursor = CursorLibrary.GetCursor(CursorSet.ArcSelect);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What does this cursor look like? Is there a png (image file) resource for the cursor that also needs to be removed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is how it looks like:

Screenshot 2025-06-18 at 4 10 57 PM

I tried going back to 2.17, 2.15 and still could not see any change in the cursor though, atleast not on hover.

DynamoSandbox_DRAuxvGAlw

else
this.Cursor = null;
}

// If selection is going to be dragged and ctrl is pressed.
if (ViewModel.IsDragging && Keyboard.Modifiers == ModifierKeys.Control)
{
Expand Down Expand Up @@ -1038,35 +1022,6 @@ private void workBench_OnLoaded(object sender, RoutedEventArgs e)
workBench.owningWorkspace = this;
}

private PortViewModel PortFromHitTestResult(DependencyObject depObject)
{
Grid grid = depObject as Grid;
if (null != grid)
return grid.DataContext as PortViewModel;

return null;
}

private DependencyObject ElementUnderMouseCursor(Point mouseCursor)
{
hitResultsList.Clear();
VisualTreeHelper.HitTest(this, null, DirectHitTestCallback,
new PointHitTestParameters(mouseCursor));

return ((hitResultsList.Count > 0) ? hitResultsList[0] : null);
}

private HitTestResultBehavior DirectHitTestCallback(HitTestResult result)
{
if (null != result && (null != result.VisualHit))
{
hitResultsList.Add(result.VisualHit);
return HitTestResultBehavior.Stop;
}

return HitTestResultBehavior.Continue;
}

private void OnWorkspaceDrop(object sender, DragEventArgs e)
{

Expand Down
Loading