mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 16:12:57 +08:00
Merge pull request #1035 from peppy/fix-empty-carousel
Fix selection not being reset correct when changing between rulesets
This commit is contained in:
commit
31ac083408
@ -135,7 +135,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public void SelectNext(int direction = 1, bool skipDifficulties = true)
|
||||
{
|
||||
if (groups.Count == 0)
|
||||
if (groups.All(g => g.State == BeatmapGroupState.Hidden))
|
||||
{
|
||||
selectedGroup = null;
|
||||
selectedPanel = null;
|
||||
|
@ -235,6 +235,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)
|
||||
@ -242,18 +249,13 @@ namespace osu.Game.Screens.Select
|
||||
}
|
||||
else
|
||||
{
|
||||
selectionChangedDebounce?.Cancel();
|
||||
|
||||
if (beatmap.Equals(beatmapNoDebounce))
|
||||
return;
|
||||
ruleset.Value = beatmap.Ruleset;
|
||||
|
||||
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