mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 06:52:53 +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)
|
public void SelectNext(int direction = 1, bool skipDifficulties = true)
|
||||||
{
|
{
|
||||||
if (groups.Count == 0)
|
if (groups.All(g => g.State == BeatmapGroupState.Hidden))
|
||||||
{
|
{
|
||||||
selectedGroup = null;
|
selectedGroup = null;
|
||||||
selectedPanel = null;
|
selectedPanel = null;
|
||||||
|
@ -235,6 +235,13 @@ namespace osu.Game.Screens.Select
|
|||||||
changeBackground(Beatmap.Value);
|
changeBackground(Beatmap.Value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
selectionChangedDebounce?.Cancel();
|
||||||
|
|
||||||
|
if (beatmap?.Equals(beatmapNoDebounce) == true)
|
||||||
|
return;
|
||||||
|
|
||||||
|
beatmapNoDebounce = beatmap;
|
||||||
|
|
||||||
if (beatmap == null)
|
if (beatmap == null)
|
||||||
{
|
{
|
||||||
if (!Beatmap.IsDefault)
|
if (!Beatmap.IsDefault)
|
||||||
@ -242,18 +249,13 @@ namespace osu.Game.Screens.Select
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
selectionChangedDebounce?.Cancel();
|
ruleset.Value = beatmap.Ruleset;
|
||||||
|
|
||||||
if (beatmap.Equals(beatmapNoDebounce))
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (beatmap.BeatmapSetInfoID == beatmapNoDebounce?.BeatmapSetInfoID)
|
if (beatmap.BeatmapSetInfoID == beatmapNoDebounce?.BeatmapSetInfoID)
|
||||||
sampleChangeDifficulty.Play();
|
sampleChangeDifficulty.Play();
|
||||||
else
|
else
|
||||||
sampleChangeBeatmap.Play();
|
sampleChangeBeatmap.Play();
|
||||||
|
|
||||||
beatmapNoDebounce = beatmap;
|
|
||||||
|
|
||||||
if (beatmap == Beatmap.Value.BeatmapInfo)
|
if (beatmap == Beatmap.Value.BeatmapInfo)
|
||||||
performLoad();
|
performLoad();
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user