diff --git a/Source/Editor/GUI/Input/ValueBox.cs b/Source/Editor/GUI/Input/ValueBox.cs index 2b13742ee..b818c56d5 100644 --- a/Source/Editor/GUI/Input/ValueBox.cs +++ b/Source/Editor/GUI/Input/ValueBox.cs @@ -173,8 +173,11 @@ namespace FlaxEditor.GUI.Input { _isSliding = false; EndMouseCapture(); - Cursor = CursorType.Default; - _cursorChanged = false; + if (_cursorChanged) + { + Cursor = CursorType.Default; + _cursorChanged = false; + } SlidingEnd?.Invoke(); } @@ -300,6 +303,18 @@ namespace FlaxEditor.GUI.Input return base.OnMouseUp(location, button); } + /// + public override void OnMouseLeave() + { + if (_cursorChanged) + { + Cursor = CursorType.Default; + _cursorChanged = false; + } + + base.OnMouseLeave(); + } + /// protected override void OnEditBegin() { diff --git a/Source/Engine/UI/GUI/Panels/SplitPanel.cs b/Source/Engine/UI/GUI/Panels/SplitPanel.cs index 5fb8c410a..2a46846e8 100644 --- a/Source/Engine/UI/GUI/Panels/SplitPanel.cs +++ b/Source/Engine/UI/GUI/Panels/SplitPanel.cs @@ -210,6 +210,11 @@ namespace FlaxEngine.GUI { // Clear flag _mouseOverSplitter = false; + if (_cursorChanged) + { + Cursor = CursorType.Default; + _cursorChanged = false; + } base.OnMouseLeave(); }