Fix right clicking on Visject boxes
Previously, the primary context menu would get triggered when right clicking on a box, causing some issues
This commit is contained in:
@@ -99,18 +99,6 @@ namespace FlaxEditor.Surface
|
||||
/// </summary>
|
||||
public event Window.MouseWheelDelegate CustomMouseWheel;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the node under the mouse location.
|
||||
/// </summary>
|
||||
/// <returns>The node or null if no intersection.</returns>
|
||||
public SurfaceNode GetNodeUnderMouse()
|
||||
{
|
||||
var pos = _rootControl.PointFromParent(ref _mousePos);
|
||||
if (_rootControl.GetChildAt(pos) is SurfaceNode node)
|
||||
return node;
|
||||
return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the control under the mouse location.
|
||||
/// </summary>
|
||||
@@ -118,9 +106,7 @@ namespace FlaxEditor.Surface
|
||||
public SurfaceControl GetControlUnderMouse()
|
||||
{
|
||||
var pos = _rootControl.PointFromParent(ref _mousePos);
|
||||
if (_rootControl.GetChildAtRecursive(pos) is SurfaceControl control)
|
||||
return control;
|
||||
return null;
|
||||
return _rootControl.GetChildAt(pos) as SurfaceControl;
|
||||
}
|
||||
|
||||
private void UpdateSelectionRectangle()
|
||||
|
||||
Reference in New Issue
Block a user