mirror of
https://github.com/ppy/osu.git
synced 2025-03-23 08:27:23 +08:00
Fix dependency not always available due to nested LoadComponentAsync call
This commit is contained in:
parent
385c9cd2e2
commit
6b8e1913ee
@ -30,16 +30,16 @@ namespace osu.Game.Screens.Edit
|
||||
{
|
||||
}
|
||||
|
||||
private Container mainContent;
|
||||
|
||||
private LoadingSpinner spinner;
|
||||
|
||||
[BackgroundDependencyLoader(true)]
|
||||
private void load([CanBeNull] BindableBeatDivisor beatDivisor)
|
||||
{
|
||||
if (beatDivisor != null)
|
||||
this.beatDivisor.BindTo(beatDivisor);
|
||||
|
||||
Container mainContent;
|
||||
|
||||
LoadingSpinner spinner;
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
mainContent = new Container
|
||||
@ -99,6 +99,11 @@ namespace osu.Game.Screens.Edit
|
||||
}
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
LoadComponentAsync(CreateMainContent(), content =>
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user