1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-12 05:27:40 +08:00

Merge pull request #1033 from peppy/fix-working-beatmap-double-load

Fix WorkingBeatmap being loaded twice when using MusicController at SongSelect
This commit is contained in:
Thomas Müller 2017-07-20 20:53:53 +02:00 committed by GitHub
commit 9dc3987834

View File

@ -218,12 +218,17 @@ namespace osu.Game.Screens.Select
private void carouselSelectionChanged(BeatmapInfo beatmap)
{
Action performLoad = delegate
{
// 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);
ensurePlayingSelected(preview);
}
changeBackground(Beatmap.Value);
};