diff --git a/Source/Editor/Surface/SurfaceNode.cs b/Source/Editor/Surface/SurfaceNode.cs index c5c011db0..09ab04c8a 100644 --- a/Source/Editor/Surface/SurfaceNode.cs +++ b/Source/Editor/Surface/SurfaceNode.cs @@ -146,6 +146,8 @@ namespace FlaxEditor.Surface /// protected virtual Color FooterColor => GroupArchetype.Color; + private Float2 mouseDownMousePosition; + /// /// Calculates the size of the node including header, footer, and margins. /// @@ -1093,7 +1095,7 @@ namespace FlaxEditor.Surface if (button == MouseButton.Left && (Archetype.Flags & NodeFlags.NoCloseButton) == 0 && _closeButtonRect.Contains(ref location)) return true; if (button == MouseButton.Right) - return true; + mouseDownMousePosition = Input.Mouse.Position; return false; } @@ -1114,6 +1116,9 @@ namespace FlaxEditor.Surface // Secondary Context Menu if (button == MouseButton.Right) { + if (mouseDownMousePosition != Input.Mouse.Position) + return true; + if (!IsSelected) Surface.Select(this); var tmp = PointToParent(ref location);