mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:43:16 +08:00
Fix current selection not being correctly maintained when BeatmapPicker
updates its display
This commit is contained in:
parent
5efffa208a
commit
6de4e05e49
@ -183,7 +183,14 @@ namespace osu.Game.Overlays.BeatmapSet
|
||||
}
|
||||
|
||||
starRatingContainer.FadeOut(100);
|
||||
Beatmap.Value = Difficulties.FirstOrDefault()?.Beatmap;
|
||||
|
||||
// If a selection is already made, try and maintain it.
|
||||
if (Beatmap.Value != null)
|
||||
Beatmap.Value = Difficulties.FirstOrDefault(b => b.Beatmap.OnlineID == Beatmap.Value.OnlineID)?.Beatmap;
|
||||
|
||||
// Else just choose the first available difficulty for now.
|
||||
Beatmap.Value ??= Difficulties.FirstOrDefault()?.Beatmap;
|
||||
|
||||
plays.Value = BeatmapSet?.PlayCount ?? 0;
|
||||
favourites.Value = BeatmapSet?.FavouriteCount ?? 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user