mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 09:32:55 +08:00
Fix distance snapping grid not updating on scroll
This commit is contained in:
parent
1c6a775338
commit
64682611bb
@ -162,12 +162,17 @@ 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>());
|
||||
lastGridUpdateTime = EditorClock.CurrentTime;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void UpdateAfterChildren()
|
||||
@ -212,6 +217,8 @@ namespace osu.Game.Rulesets.Edit
|
||||
{
|
||||
distanceSnapGridContainer.Child = distanceSnapGrid;
|
||||
distanceSnapGridContainer.Show();
|
||||
|
||||
lastGridUpdateTime = EditorClock.CurrentTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user