1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 16:12:57 +08:00

Fix incorrect initial conditional

Turns out this wasn't actually required.
This commit is contained in:
Dean Herbert 2021-01-03 22:44:30 +09:00
parent efb71713ef
commit 53e6a349bb

View File

@ -733,12 +733,6 @@ namespace osu.Game.Screens.Select
private const float panel_padding = 5; private const float panel_padding = 5;
/// <summary>
/// After loading, we want to invoke a selection changed event at least once.
/// This handles the case where this event is potentially sending a null selection.
/// </summary>
private bool sentInitialSelectionEvent;
/// <summary> /// <summary>
/// Computes the target Y positions for every item in the carousel. /// Computes the target Y positions for every item in the carousel.
/// </summary> /// </summary>
@ -802,12 +796,10 @@ namespace osu.Game.Screens.Select
{ {
bool selectionLost = selectedBeatmapSet != null && selectedBeatmapSet.State.Value != CarouselItemState.Selected; bool selectionLost = selectedBeatmapSet != null && selectedBeatmapSet.State.Value != CarouselItemState.Selected;
if (selectionLost || !sentInitialSelectionEvent) if (selectionLost)
{ {
selectedBeatmapSet = null; selectedBeatmapSet = null;
SelectionChanged?.Invoke(null); SelectionChanged?.Invoke(null);
sentInitialSelectionEvent = true;
} }
} }
} }