Allow context menu to show when activating scene tree with right click

This commit is contained in:
2025-04-16 21:23:39 +03:00
parent 04e6943b2d
commit 7dfd7de0b7

View File

@@ -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;
}
/// <inheritdoc />
public override void OnLostFocus()
{
_isMouseDown = false;
base.OnLostFocus();
}
/// <inheritdoc />
public override DragDropEffect OnDragEnter(ref Float2 location, DragData data)
{