mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:07:44 +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)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load([CanBeNull] BindableBeatDivisor beatDivisor)
|
private void load([CanBeNull] BindableBeatDivisor beatDivisor)
|
||||||
{
|
{
|
||||||
if (beatDivisor != null)
|
if (beatDivisor != null)
|
||||||
this.beatDivisor.BindTo(beatDivisor);
|
this.beatDivisor.BindTo(beatDivisor);
|
||||||
|
|
||||||
Container mainContent;
|
|
||||||
|
|
||||||
LoadingSpinner spinner;
|
|
||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
mainContent = new Container
|
mainContent = new Container
|
||||||
@ -99,6 +99,11 @@ namespace osu.Game.Screens.Edit
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
base.LoadComplete();
|
||||||
|
|
||||||
LoadComponentAsync(CreateMainContent(), content =>
|
LoadComponentAsync(CreateMainContent(), content =>
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user