1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 09:32:55 +08:00

Fix OsuScreenDependencies not caching non-leased versions

This commit is contained in:
Dean Herbert 2019-12-13 20:05:54 +09:00
parent 952bc96bbf
commit 395b058ff8

View File

@ -26,16 +26,26 @@ namespace osu.Game.Screens
Beatmap = parent.Get<LeasedBindable<WorkingBeatmap>>()?.GetBoundCopy();
if (Beatmap == null)
{
Cache(Beatmap = parent.Get<Bindable<WorkingBeatmap>>().BeginLease(false));
CacheAs(Beatmap);
}
Ruleset = parent.Get<LeasedBindable<RulesetInfo>>()?.GetBoundCopy();
if (Ruleset == null)
{
Cache(Ruleset = parent.Get<Bindable<RulesetInfo>>().BeginLease(true));
CacheAs(Ruleset);
}
Mods = parent.Get<LeasedBindable<IReadOnlyList<Mod>>>()?.GetBoundCopy();
if (Mods == null)
{
Cache(Mods = parent.Get<Bindable<IReadOnlyList<Mod>>>().BeginLease(true));
CacheAs(Mods);
}
}
else
{