Fix rare issues on input bugs in Visject
This commit is contained in:
@@ -469,7 +469,8 @@ namespace FlaxEditor.Surface
|
|||||||
bool handled = base.OnMouseDown(location, button);
|
bool handled = base.OnMouseDown(location, button);
|
||||||
if (!handled)
|
if (!handled)
|
||||||
CustomMouseDown?.Invoke(ref location, button, ref handled);
|
CustomMouseDown?.Invoke(ref location, button, ref handled);
|
||||||
if (handled)
|
var root = Root;
|
||||||
|
if (handled || root == null)
|
||||||
{
|
{
|
||||||
// Clear flags
|
// Clear flags
|
||||||
_isMovingSelection = false;
|
_isMovingSelection = false;
|
||||||
@@ -523,11 +524,11 @@ namespace FlaxEditor.Surface
|
|||||||
if (_leftMouseDown && controlUnderMouse.CanSelect(ref cLocation))
|
if (_leftMouseDown && controlUnderMouse.CanSelect(ref cLocation))
|
||||||
{
|
{
|
||||||
// Check if user is pressing control
|
// Check if user is pressing control
|
||||||
if (Root.GetKey(KeyboardKeys.Control))
|
if (root.GetKey(KeyboardKeys.Control))
|
||||||
{
|
{
|
||||||
AddToSelection(controlUnderMouse);
|
AddToSelection(controlUnderMouse);
|
||||||
}
|
}
|
||||||
else if (Root.GetKey(KeyboardKeys.Shift))
|
else if (root.GetKey(KeyboardKeys.Shift))
|
||||||
{
|
{
|
||||||
RemoveFromSelection(controlUnderMouse);
|
RemoveFromSelection(controlUnderMouse);
|
||||||
}
|
}
|
||||||
@@ -539,7 +540,7 @@ namespace FlaxEditor.Surface
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Start moving selected nodes
|
// Start moving selected nodes
|
||||||
if (!Root.GetKey(KeyboardKeys.Shift))
|
if (!root.GetKey(KeyboardKeys.Shift))
|
||||||
{
|
{
|
||||||
StartMouseCapture();
|
StartMouseCapture();
|
||||||
_movingSelectionViewPos = _rootControl.Location;
|
_movingSelectionViewPos = _rootControl.Location;
|
||||||
@@ -559,7 +560,7 @@ namespace FlaxEditor.Surface
|
|||||||
// Start selecting or commenting
|
// Start selecting or commenting
|
||||||
StartMouseCapture();
|
StartMouseCapture();
|
||||||
|
|
||||||
if (!Root.GetKey(KeyboardKeys.Control) && !Root.GetKey(KeyboardKeys.Shift))
|
if (!root.GetKey(KeyboardKeys.Control) && !root.GetKey(KeyboardKeys.Shift))
|
||||||
{
|
{
|
||||||
ClearSelection();
|
ClearSelection();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user