mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 07:27:45 +08:00
Move event subscription to LoadComplete
Prevents attempting to read from the `colours` field before it is actually injected.
This commit is contained in:
parent
6627e7e459
commit
b1029a124c
@ -113,7 +113,6 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
};
|
||||
|
||||
controlPoints = group.ControlPoints.GetBoundCopy();
|
||||
controlPoints.CollectionChanged += (_, __) => createChildren();
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
@ -125,6 +124,12 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
createChildren();
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
controlPoints.CollectionChanged += (_, __) => createChildren();
|
||||
}
|
||||
|
||||
private void createChildren()
|
||||
{
|
||||
fill.ChildrenEnumerable = controlPoints.Select(createAttribute).Where(c => c != null);
|
||||
|
Loading…
x
Reference in New Issue
Block a user