Fix incorrect distance snap grid being displayed when in selection mode

This commit is contained in:
Dean Herbert 2020-02-07 16:09:54 +09:00
parent 55a8e88609
commit f63bf06373

View File

@ -174,7 +174,7 @@ namespace osu.Game.Rulesets.Edit
{ {
base.Update(); base.Update();
if (EditorClock.CurrentTime != lastGridUpdateTime && blueprintContainer.CurrentTool != null) if (EditorClock.CurrentTime != lastGridUpdateTime && !(blueprintContainer.CurrentTool is SelectTool))
showGridFor(Enumerable.Empty<HitObject>()); showGridFor(Enumerable.Empty<HitObject>());
} }
@ -328,7 +328,7 @@ namespace osu.Game.Rulesets.Edit
/// Creates the <see cref="DistanceSnapGrid"/> applicable for a <see cref="HitObject"/> selection. /// Creates the <see cref="DistanceSnapGrid"/> applicable for a <see cref="HitObject"/> selection.
/// </summary> /// </summary>
/// <param name="selectedHitObjects">The <see cref="HitObject"/> selection.</param> /// <param name="selectedHitObjects">The <see cref="HitObject"/> selection.</param>
/// <returns>The <see cref="DistanceSnapGrid"/> for <paramref name="selectedHitObjects"/>.</returns> /// <returns>The <see cref="DistanceSnapGrid"/> for <paramref name="selectedHitObjects"/>. If empty, a grid is returned for the current poitn in time.</returns>
[CanBeNull] [CanBeNull]
protected virtual DistanceSnapGrid CreateDistanceSnapGrid([NotNull] IEnumerable<HitObject> selectedHitObjects) => null; protected virtual DistanceSnapGrid CreateDistanceSnapGrid([NotNull] IEnumerable<HitObject> selectedHitObjects) => null;