mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:43:04 +08:00
Avoid using CreateChildDependencies with a *child* bindable
Don't do this.
This commit is contained in:
parent
3e3ff81229
commit
ce19b2ed36
@ -50,6 +50,9 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
|
||||
private readonly LoadingAnimation loading;
|
||||
|
||||
[Cached(typeof(IBindable<RulesetInfo>))]
|
||||
private readonly Bindable<RulesetInfo> ruleset = new Bindable<RulesetInfo>();
|
||||
|
||||
public Header()
|
||||
{
|
||||
ExternalLinkButton externalLink;
|
||||
@ -80,6 +83,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
},
|
||||
RulesetSelector = new BeatmapRulesetSelector
|
||||
{
|
||||
Current = ruleset,
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
}
|
||||
@ -222,13 +226,6 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
};
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
{
|
||||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
dependencies.CacheAs<IBindable<RulesetInfo>>(RulesetSelector.Current);
|
||||
return dependencies;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user