Allow context menu to show when activating scene tree with right click
This commit is contained in:
@@ -26,7 +26,6 @@ namespace FlaxEditor.Windows
|
|||||||
private Tree _tree;
|
private Tree _tree;
|
||||||
private Panel _sceneTreePanel;
|
private Panel _sceneTreePanel;
|
||||||
private bool _isUpdatingSelection;
|
private bool _isUpdatingSelection;
|
||||||
private bool _isMouseDown;
|
|
||||||
|
|
||||||
private DragAssets _dragAssets;
|
private DragAssets _dragAssets;
|
||||||
private DragActorType _dragActorType;
|
private DragActorType _dragActorType;
|
||||||
@@ -317,10 +316,7 @@ namespace FlaxEditor.Windows
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (buttons == MouseButton.Right)
|
if (buttons == MouseButton.Right)
|
||||||
{
|
|
||||||
_isMouseDown = true;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -331,10 +327,8 @@ namespace FlaxEditor.Windows
|
|||||||
if (base.OnMouseUp(location, buttons))
|
if (base.OnMouseUp(location, buttons))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if (_isMouseDown && buttons == MouseButton.Right)
|
if (buttons == MouseButton.Right)
|
||||||
{
|
{
|
||||||
_isMouseDown = false;
|
|
||||||
|
|
||||||
if (Editor.StateMachine.CurrentState.CanEditScene)
|
if (Editor.StateMachine.CurrentState.CanEditScene)
|
||||||
{
|
{
|
||||||
// Show context menu
|
// Show context menu
|
||||||
@@ -359,14 +353,6 @@ namespace FlaxEditor.Windows
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
|
||||||
public override void OnLostFocus()
|
|
||||||
{
|
|
||||||
_isMouseDown = false;
|
|
||||||
|
|
||||||
base.OnLostFocus();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public override DragDropEffect OnDragEnter(ref Float2 location, DragData data)
|
public override DragDropEffect OnDragEnter(ref Float2 location, DragData data)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user