diff --git a/Source/Editor/Viewport/EditorGizmoViewport.cs b/Source/Editor/Viewport/EditorGizmoViewport.cs index 856ae20da..9fb3d962e 100644 --- a/Source/Editor/Viewport/EditorGizmoViewport.cs +++ b/Source/Editor/Viewport/EditorGizmoViewport.cs @@ -70,10 +70,10 @@ namespace FlaxEditor.Viewport public bool IsControlDown => _input.IsControlDown; /// - public bool SnapToGround => Editor.Instance.Options.Options.Input.SnapToGround.Process(Root); + public bool SnapToGround => ContainsFocus && Editor.Instance.Options.Options.Input.SnapToGround.Process(Root); /// - public bool SnapToVertex => Editor.Instance.Options.Options.Input.SnapToVertex.Process(Root); + public bool SnapToVertex => ContainsFocus && Editor.Instance.Options.Options.Input.SnapToVertex.Process(Root); /// public Float2 MouseDelta => _mouseDelta * 1000; diff --git a/Source/Editor/Viewport/PrefabWindowViewport.cs b/Source/Editor/Viewport/PrefabWindowViewport.cs index 081c1d4f1..32473c5ea 100644 --- a/Source/Editor/Viewport/PrefabWindowViewport.cs +++ b/Source/Editor/Viewport/PrefabWindowViewport.cs @@ -288,7 +288,7 @@ namespace FlaxEditor.Viewport public bool SnapToGround => false; /// - public bool SnapToVertex => Editor.Instance.Options.Options.Input.SnapToVertex.Process(Root); + public bool SnapToVertex => ContainsFocus && Editor.Instance.Options.Options.Input.SnapToVertex.Process(Root); /// public Float2 MouseDelta => _mouseDelta * 1000;