Fixes
This commit is contained in:
@@ -189,9 +189,11 @@ namespace FlaxEditor
|
||||
|
||||
internal float ViewScale
|
||||
{
|
||||
get => _view.Scale.X;
|
||||
get => _view?.Scale.X ?? 1;
|
||||
set
|
||||
{
|
||||
if (_view == null)
|
||||
return;
|
||||
value = Mathf.Clamp(value, 0.1f, 4.0f);
|
||||
_view.Scale = new Float2(value);
|
||||
}
|
||||
@@ -483,7 +485,7 @@ namespace FlaxEditor
|
||||
}
|
||||
}
|
||||
}
|
||||
if (EnableSelecting && !_mouseMovesControl && IsMouseOver)
|
||||
if (EnableSelecting && !_mouseMovesControl && !_mouseMovesWidget && IsMouseOver)
|
||||
{
|
||||
// Highlight control under mouse for easier selecting (except if already selected)
|
||||
if (RayCastControl(ref mousePos, out var hitControl) &&
|
||||
|
||||
@@ -201,8 +201,8 @@ namespace FlaxEditor.Options
|
||||
/// <returns>True if input has been processed, otherwise false.</returns>
|
||||
public bool Process(Control control)
|
||||
{
|
||||
var root = control.Root;
|
||||
return root.GetKey(Key) && ProcessModifiers(control);
|
||||
var root = control?.Root;
|
||||
return root != null && root.GetKey(Key) && ProcessModifiers(control);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -76,10 +76,10 @@ namespace FlaxEditor.Viewport
|
||||
public Float2 MouseDelta => _mouseDelta * 1000;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool UseSnapping => Root.GetKey(KeyboardKeys.Control);
|
||||
public bool UseSnapping => Root?.GetKey(KeyboardKeys.Control) ?? false;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool UseDuplicate => Root.GetKey(KeyboardKeys.Shift);
|
||||
public bool UseDuplicate => Root?.GetKey(KeyboardKeys.Shift) ?? false;
|
||||
|
||||
/// <inheritdoc />
|
||||
public Undo Undo { get; }
|
||||
|
||||
Reference in New Issue
Block a user