mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 10:22:56 +08:00
Switch to a better way of deciding on null selection
This avoids `SelectionChanged` potentially being invoked multiple times after `selectedBeatmapSet` is already `null`.
This commit is contained in:
parent
2473f6de46
commit
09ce24a7db
@ -511,7 +511,7 @@ namespace osu.Game.Screens.Select
|
||||
currentY += DrawHeight / 2;
|
||||
scrollableContent.Height = currentY;
|
||||
|
||||
if (!Items.Any() || selectedBeatmapSet != null && selectedBeatmapSet.State.Value != CarouselItemState.Selected)
|
||||
if (selectedBeatmapSet != null && (selectedBeatmap == null || selectedBeatmapSet.State.Value != CarouselItemState.Selected))
|
||||
{
|
||||
selectedBeatmapSet = null;
|
||||
SelectionChanged?.Invoke(null);
|
||||
|
Loading…
Reference in New Issue
Block a user