Fix showing context menu in Scene Tree window with scroll used

#576
This commit is contained in:
Wojtek Figat
2021-08-05 19:12:34 +02:00
parent 425c23fea1
commit 1b3c74c3eb
2 changed files with 3 additions and 3 deletions

View File

@@ -167,7 +167,7 @@ namespace FlaxEditor.Windows
/// </summary>
/// <param name="parent">The parent control.</param>
/// <param name="location">The location (within a given control).</param>
private void ShowContextMenu(Control parent, ref Vector2 location)
private void ShowContextMenu(Control parent, Vector2 location)
{
var contextMenu = CreateContextMenu();

View File

@@ -276,7 +276,7 @@ namespace FlaxEditor.Windows
if (!Editor.StateMachine.CurrentState.CanEditScene)
return;
ShowContextMenu(node, ref location);
ShowContextMenu(node, location);
}
/// <inheritdoc />
@@ -379,7 +379,7 @@ namespace FlaxEditor.Windows
{
// Show context menu
Editor.SceneEditing.Deselect();
ShowContextMenu(this, ref location);
ShowContextMenu(Parent, location + _searchBox.BottomLeft);
}
return true;