Release rubber band selection when viewport starts controlling the view

This commit is contained in:
2025-03-26 19:12:30 +02:00
parent 3730176783
commit 765319ee25

View File

@@ -611,10 +611,18 @@ namespace FlaxEditor.Viewport
// Don't allow rubber band selection when gizmo is controlling mouse, vertex painting mode, or cloth painting is enabled
bool canStart = !(IsControllingMouse || IsRightMouseButtonDown || IsAltKeyDown) &&
Gizmos?.Active is TransformGizmo && !Gizmos.Active.IsControllingMouse;
Gizmos?.Active is TransformGizmo;
_rubberBandSelector.TryCreateRubberBand(canStart, _viewMousePos);
}
/// <inheritdoc />
protected override void OnControlMouseBegin(Window win)
{
_rubberBandSelector.ReleaseRubberBandSelection();
base.OnControlMouseBegin(win);
}
/// <inheritdoc />
protected override void OnLeftMouseButtonDown()
{