From 7dfd7de0b7e7ee7e4bbe586fda8d0736c0ad7ce5 Mon Sep 17 00:00:00 2001 From: Ari Vuollet Date: Wed, 16 Apr 2025 21:23:39 +0300 Subject: [PATCH] Allow context menu to show when activating scene tree with right click --- Source/Editor/Windows/SceneTreeWindow.cs | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/Source/Editor/Windows/SceneTreeWindow.cs b/Source/Editor/Windows/SceneTreeWindow.cs index e0c9e0068..93774e514 100644 --- a/Source/Editor/Windows/SceneTreeWindow.cs +++ b/Source/Editor/Windows/SceneTreeWindow.cs @@ -26,7 +26,6 @@ namespace FlaxEditor.Windows private Tree _tree; private Panel _sceneTreePanel; private bool _isUpdatingSelection; - private bool _isMouseDown; private DragAssets _dragAssets; private DragActorType _dragActorType; @@ -317,10 +316,7 @@ namespace FlaxEditor.Windows return true; if (buttons == MouseButton.Right) - { - _isMouseDown = true; return true; - } return false; } @@ -331,10 +327,8 @@ namespace FlaxEditor.Windows if (base.OnMouseUp(location, buttons)) return true; - if (_isMouseDown && buttons == MouseButton.Right) + if (buttons == MouseButton.Right) { - _isMouseDown = false; - if (Editor.StateMachine.CurrentState.CanEditScene) { // Show context menu @@ -359,14 +353,6 @@ namespace FlaxEditor.Windows return false; } - /// - public override void OnLostFocus() - { - _isMouseDown = false; - - base.OnLostFocus(); - } - /// public override DragDropEffect OnDragEnter(ref Float2 location, DragData data) {