Release rubber band selection when viewport starts controlling the view
This commit is contained in:
@@ -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
|
// Don't allow rubber band selection when gizmo is controlling mouse, vertex painting mode, or cloth painting is enabled
|
||||||
bool canStart = !(IsControllingMouse || IsRightMouseButtonDown || IsAltKeyDown) &&
|
bool canStart = !(IsControllingMouse || IsRightMouseButtonDown || IsAltKeyDown) &&
|
||||||
Gizmos?.Active is TransformGizmo && !Gizmos.Active.IsControllingMouse;
|
Gizmos?.Active is TransformGizmo;
|
||||||
_rubberBandSelector.TryCreateRubberBand(canStart, _viewMousePos);
|
_rubberBandSelector.TryCreateRubberBand(canStart, _viewMousePos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
protected override void OnControlMouseBegin(Window win)
|
||||||
|
{
|
||||||
|
_rubberBandSelector.ReleaseRubberBandSelection();
|
||||||
|
|
||||||
|
base.OnControlMouseBegin(win);
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
protected override void OnLeftMouseButtonDown()
|
protected override void OnLeftMouseButtonDown()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user