1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:42:56 +08:00

Merge pull request #6581 from smoogipoo/fix-grid-update

Fix distance snapping grid not updating on scroll
This commit is contained in:
Dean Herbert 2019-10-23 18:20:15 +09:00 committed by GitHub
commit 8250e94ad8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -162,11 +162,13 @@ namespace osu.Game.Rulesets.Edit
inputManager = GetContainingInputManager();
}
private double lastGridUpdateTime;
protected override void Update()
{
base.Update();
if (EditorClock.ElapsedFrameTime != 0 && blueprintContainer.CurrentTool != null)
if (EditorClock.CurrentTime != lastGridUpdateTime && blueprintContainer.CurrentTool != null)
showGridFor(Enumerable.Empty<HitObject>());
}
@ -213,6 +215,8 @@ namespace osu.Game.Rulesets.Edit
distanceSnapGridContainer.Child = distanceSnapGrid;
distanceSnapGridContainer.Show();
}
lastGridUpdateTime = EditorClock.CurrentTime;
}
private ScheduledDelegate scheduledUpdate;