mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Fix selection not being reset correct when changing between rulesets
Carousels filtered to results with no maps visible were not being handled correctly in a few different ways. This covers all those scenarios.
This commit is contained in:
parent
8417e59de3
commit
a59557f039
@ -133,7 +133,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public void SelectNext(int direction = 1, bool skipDifficulties = true)
|
||||
{
|
||||
if (groups.Count == 0)
|
||||
if (groups.Count == 0 || groups.All(g => g.State == BeatmapGroupState.Hidden))
|
||||
{
|
||||
selectedGroup = null;
|
||||
selectedPanel = null;
|
||||
|
@ -229,6 +229,13 @@ namespace osu.Game.Screens.Select
|
||||
changeBackground(Beatmap.Value);
|
||||
};
|
||||
|
||||
selectionChangedDebounce?.Cancel();
|
||||
|
||||
if (beatmap?.Equals(beatmapNoDebounce) == true)
|
||||
return;
|
||||
|
||||
beatmapNoDebounce = beatmap;
|
||||
|
||||
if (beatmap == null)
|
||||
{
|
||||
if (!Beatmap.IsDefault)
|
||||
@ -236,18 +243,11 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
else
|
||||
{
|
||||
selectionChangedDebounce?.Cancel();
|
||||
|
||||
if (beatmap.Equals(beatmapNoDebounce))
|
||||
return;
|
||||
|
||||
if (beatmap.BeatmapSetInfoID == beatmapNoDebounce?.BeatmapSetInfoID)
|
||||
sampleChangeDifficulty.Play();
|
||||
else
|
||||
sampleChangeBeatmap.Play();
|
||||
|
||||
beatmapNoDebounce = beatmap;
|
||||
|
||||
if (beatmap == Beatmap.Value.BeatmapInfo)
|
||||
performLoad();
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user