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

Fix distance snapping grid not updating on scroll

This commit is contained in:
smoogipoo 2019-10-23 16:39:14 +09:00
parent 1c6a775338
commit 64682611bb

View File

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