Merge branch 'master' into fix-empty-carousel

This commit is contained in:
Thomas Müller
2017-07-20 21:04:45 +02:00
committed by GitHub
6 changed files with 15 additions and 20 deletions

View File

@ -219,11 +219,16 @@ namespace osu.Game.Screens.Select
{
Action performLoad = delegate
{
bool preview = beatmap?.BeatmapSetInfoID != Beatmap.Value.BeatmapInfo.BeatmapSetInfoID;
// We may be arriving here due to another component changing the bindable Beatmap.
// In these cases, the other component has already loaded the beatmap, so we don't need to do so again.
if (beatmap?.Equals(Beatmap.Value.BeatmapInfo) != true)
{
bool preview = beatmap?.BeatmapSetInfoID != Beatmap.Value.BeatmapInfo.BeatmapSetInfoID;
Beatmap.Value = database.GetWorkingBeatmap(beatmap, Beatmap);
Beatmap.Value = database.GetWorkingBeatmap(beatmap, Beatmap);
ensurePlayingSelected(preview);
}
ensurePlayingSelected(preview);
changeBackground(Beatmap.Value);
};