mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 09:27:18 +09: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 = group.ControlPoints.GetBoundCopy();
|
||||||
controlPoints.CollectionChanged += (_, __) => createChildren();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
@ -125,6 +124,12 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
createChildren();
|
createChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
controlPoints.CollectionChanged += (_, __) => createChildren();
|
||||||
|
}
|
||||||
|
|
||||||
private void createChildren()
|
private void createChildren()
|
||||||
{
|
{
|
||||||
fill.ChildrenEnumerable = controlPoints.Select(createAttribute).Where(c => c != null);
|
fill.ChildrenEnumerable = controlPoints.Select(createAttribute).Where(c => c != null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user