mirror of https://github.com/ppy/osu
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 @@ void performMove(float y, float? startY = null)
|
|||
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