mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 05:42:54 +08:00
Fix deleting last visible beatmap doesn't trigger selecting null beatmap
This commit is contained in:
parent
c5de97a06f
commit
502940ddf3
@ -181,13 +181,18 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
public Action<BeatmapInfo> HideDifficultyRequested;
|
||||
|
||||
private void selectNullBeatmap()
|
||||
{
|
||||
selectedGroup = null;
|
||||
selectedPanel = null;
|
||||
SelectionChanged?.Invoke(null);
|
||||
}
|
||||
|
||||
public void SelectNext(int direction = 1, bool skipDifficulties = true)
|
||||
{
|
||||
if (groups.All(g => g.State == BeatmapGroupState.Hidden))
|
||||
{
|
||||
selectedGroup = null;
|
||||
selectedPanel = null;
|
||||
SelectionChanged?.Invoke(null);
|
||||
selectNullBeatmap();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -376,7 +381,12 @@ namespace osu.Game.Screens.Select
|
||||
return;
|
||||
|
||||
if (selectedGroup == group)
|
||||
SelectNext();
|
||||
{
|
||||
if (getVisibleGroups().Count() == 1)
|
||||
selectNullBeatmap();
|
||||
else
|
||||
SelectNext();
|
||||
}
|
||||
|
||||
groups.Remove(group);
|
||||
panels.Remove(group.Header);
|
||||
|
Loading…
Reference in New Issue
Block a user