From a59557f03926159ba379e8a77df19cdf892a9894 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 20 Jul 2017 15:12:20 +0900 Subject: [PATCH] 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. --- osu.Game/Screens/Select/BeatmapCarousel.cs | 2 +- osu.Game/Screens/Select/SongSelect.cs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index e135fefc6d..d2984ec2ae 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -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; diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index ea012f45e4..15bdc08eea 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -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