From bbe54969b0eede35e7405eeff1a91495c3d2931f Mon Sep 17 00:00:00 2001 From: xxSeys1 Date: Mon, 16 Jun 2025 16:51:30 +0200 Subject: [PATCH] fix close visject surface was_ flags to properly reset to false --- Source/Editor/Surface/VisjectSurface.Draw.cs | 4 ++++ Source/Editor/Surface/VisjectSurface.Input.cs | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Source/Editor/Surface/VisjectSurface.Draw.cs b/Source/Editor/Surface/VisjectSurface.Draw.cs index 01277d0d2..f60c19d21 100644 --- a/Source/Editor/Surface/VisjectSurface.Draw.cs +++ b/Source/Editor/Surface/VisjectSurface.Draw.cs @@ -225,6 +225,10 @@ namespace FlaxEditor.Surface _rootControl.DrawComments(); + // Reset input flags here because this is the closest to Update we have + WasBoxSelecting = IsBoxSelecting; + WasMovingSelection = IsMovingSelection; + if (IsBoxSelecting) { DrawSelection(); diff --git a/Source/Editor/Surface/VisjectSurface.Input.cs b/Source/Editor/Surface/VisjectSurface.Input.cs index 63dfa063d..09df195eb 100644 --- a/Source/Editor/Surface/VisjectSurface.Input.cs +++ b/Source/Editor/Surface/VisjectSurface.Input.cs @@ -590,9 +590,6 @@ namespace FlaxEditor.Surface // Cache flags and state if (_leftMouseDown && button == MouseButton.Left) { - WasBoxSelecting = IsBoxSelecting; - WasMovingSelection = _isMovingSelection; - _leftMouseDown = false; EndMouseCapture(); Cursor = CursorType.Default;