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