Move load method up

This commit is contained in:
Dean Herbert 2020-05-19 23:02:20 +09:00
parent a6f3dc53f7
commit c28a9bdb80
1 changed files with 11 additions and 12 deletions

View File

@ -51,7 +51,6 @@ public class ManiaBeatSnapGrid : Component
public (double start, double end)? SelectionTimeRange
{
get => selectionTimeRange;
set
{
if (value == selectionTimeRange)
@ -62,17 +61,6 @@ public class ManiaBeatSnapGrid : Component
}
}
protected override void Update()
{
base.Update();
if (!lineCache.IsValid)
{
lineCache.Validate();
createLines();
}
}
[BackgroundDependencyLoader]
private void load()
{
@ -90,6 +78,17 @@ private void load()
beatDivisor.BindValueChanged(_ => createLines(), true);
}
protected override void Update()
{
base.Update();
if (!lineCache.IsValid)
{
lineCache.Validate();
createLines();
}
}
private readonly Stack<DrawableGridLine> availableLines = new Stack<DrawableGridLine>();
private void createLines()