Fix flashing when changing beat divisor

This commit is contained in:
smoogipoo 2020-05-14 19:58:39 +09:00
parent 42c3d892cd
commit 0e33494074
2 changed files with 12 additions and 4 deletions

View File

@ -119,7 +119,15 @@ namespace osu.Game.Rulesets.Mania.Edit
return (new Vector2(position.X, minDistLinePosition.Y + noteOffset), minDistLine.HitObject.StartTime);
}
public void SetRange(double minTime, double maxTime) => Schedule(() =>
public void SetRange(double minTime, double maxTime)
{
if (LoadState >= LoadState.Ready)
setRange(minTime, maxTime);
else
Schedule(() => setRange(minTime, maxTime));
}
private void setRange(double minTime, double maxTime)
{
var linesBefore = new List<DrawableGridLine>();
var linesDuring = new List<DrawableGridLine>();
@ -156,7 +164,7 @@ namespace osu.Game.Rulesets.Mania.Edit
linesAfter[i].Colour = OsuColour.Gray(0.5f / (offset + 1));
}
}
});
}
private class Grid : ScrollingHitObjectContainer
{

View File

@ -60,9 +60,9 @@ namespace osu.Game.Rulesets.Mania.Edit
public IScrollingInfo ScrollingInfo => drawableRuleset.ScrollingInfo;
protected override void Update()
protected override void UpdateAfterChildren()
{
base.Update();
base.UpdateAfterChildren();
if (BlueprintContainer.CurrentTool is SelectTool)
{