1
0
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:
Thomas Müller 2017-07-20 21:50:19 +02:00 committed by GitHub
commit 31ac083408
2 changed files with 9 additions and 7 deletions

View File

@ -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;

View File

@ -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