From 18201d9b7ff4525389c61fde34c6e00334ec0fb1 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 5 May 2026 17:02:48 +0000
Subject: [PATCH 1/4] Initial plan
From d990908949f7dcb96b9b7beb8bf9fdb296dea100 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Tue, 5 May 2026 17:11:38 +0000
Subject: [PATCH 2/4] DYN-10464 Fix orbit wheel persisting when releasing ESC
key mid-orbit
Agent-Logs-Url: https://github.com/DynamoDS/Dynamo/sessions/d7d560c9-9a6b-436f-b646-84c9cc255ac9
Co-authored-by: johnpierson <15744724+johnpierson@users.noreply.github.com>
---
src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs | 4 ++++
src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs | 13 +++++++++++++
2 files changed, 17 insertions(+)
diff --git a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
index 0039a336d97..12beeefc08b 100644
--- a/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
+++ b/src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
@@ -2365,6 +2365,10 @@ private void DynamoView_KeyUp(object sender, KeyEventArgs e)
if (dynamoViewModel.BackgroundPreviewViewModel.CanNavigateBackground)
{
dynamoViewModel.BackgroundPreviewViewModel.NavigationKeyIsDown = false;
+ // Release any mouse capture held by the 3D preview viewport
+ // (e.g., during a right-click orbit gesture) so the orbit wheel
+ // indicator disappears immediately when returning to graph view.
+ BackgroundPreview?.ReleaseViewportMouseCapture();
dynamoViewModel.EscapeCommand.Execute(null);
e.Handled = true;
}
diff --git a/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs b/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs
index e0fb71e17e9..c25476c22d4 100644
--- a/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs
+++ b/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs
@@ -448,6 +448,19 @@ private Point3D GetCameraPosition()
{
return View.GetCameraPosition();
}
+
+ ///
+ /// Releases mouse capture from the 3D viewport if it (or any of its children)
+ /// currently holds the mouse. This stops any ongoing camera gesture such as
+ /// orbit and hides the orbit indicator when switching back to graph view.
+ ///
+ internal void ReleaseViewportMouseCapture()
+ {
+ if (watch_view?.IsMouseCaptureWithin == true)
+ {
+ Mouse.Capture(null);
+ }
+ }
}
From 0d31bd53741bc75c8a3a402037f0d336d6497632 Mon Sep 17 00:00:00 2001
From: john pierson
Date: Tue, 5 May 2026 11:23:46 -0600
Subject: [PATCH 3/4] Potential fix for pull request finding 'Unnecessarily
complex Boolean expression'
Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
---
src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs b/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs
index c25476c22d4..d5d4066f3df 100644
--- a/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs
+++ b/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs
@@ -456,7 +456,7 @@ private Point3D GetCameraPosition()
///
internal void ReleaseViewportMouseCapture()
{
- if (watch_view?.IsMouseCaptureWithin == true)
+ if (watch_view?.IsMouseCaptureWithin ?? false)
{
Mouse.Capture(null);
}
From 2d3330be738f3d438026c7e161e25cd0c7cfc0ef Mon Sep 17 00:00:00 2001
From: john pierson
Date: Tue, 5 May 2026 12:21:59 -0600
Subject: [PATCH 4/4] DYN-10464 Simulate MouseUp to properly end orbit gesture
on ESC release
HelixToolkit's MouseGestureHandler subscribes to MouseUp (in Execute())
to call Completed() -> HideTargetAdorner(), but has no LostMouseCapture
handler. Releasing WPF mouse capture alone therefore never cleans up the
gesture state or hides the orbit wheel indicator.
Fix: after Mouse.Capture(null), raise a synthetic right-button MouseUp on
the viewport so HelixToolkit's OnMouseUp fires, completing the gesture and
dismissing the orbit indicator immediately when the user releases ESC.
The synthetic MouseButton.Right event is safe for NodeManipulator.MouseUp,
which guards early on non-left-button events.
Co-Authored-By: Claude Sonnet 4.6
---
.../Views/Preview/Watch3DView.xaml.cs | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs b/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs
index d5d4066f3df..0f14e4584be 100644
--- a/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs
+++ b/src/DynamoCoreWpf/Views/Preview/Watch3DView.xaml.cs
@@ -450,15 +450,25 @@ private Point3D GetCameraPosition()
}
///
- /// Releases mouse capture from the 3D viewport if it (or any of its children)
- /// currently holds the mouse. This stops any ongoing camera gesture such as
- /// orbit and hides the orbit indicator when switching back to graph view.
+ /// Ends any active HelixToolkit camera gesture (e.g. right-click orbit) and
+ /// hides the orbit indicator when switching back to graph view.
///
+ ///
+ /// HelixToolkit's MouseGestureHandler has no LostMouseCapture handler, so
+ /// calling Mouse.Capture(null) alone releases WPF capture but never invokes
+ /// Completed() / HideTargetAdorner(). Raising a synthetic MouseUp causes
+ /// HelixToolkit's OnMouseUp to run, which properly ends the gesture.
+ ///
internal void ReleaseViewportMouseCapture()
{
if (watch_view?.IsMouseCaptureWithin ?? false)
{
Mouse.Capture(null);
+ var args = new MouseButtonEventArgs(Mouse.PrimaryDevice, 0, MouseButton.Right)
+ {
+ RoutedEvent = UIElement.MouseUpEvent
+ };
+ watch_view.RaiseEvent(args);
}
}
}