mirror of
https://github.com/osukey/osukey.git
synced 2025-05-17 11:37:32 +09:00
Merge pull request #1055 from tgi74/master
Fixed various exceptions when no beatmaps are imported
This commit is contained in:
commit
1c501df83c
@ -178,6 +178,9 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
public void SelectNextRandom()
|
public void SelectNextRandom()
|
||||||
{
|
{
|
||||||
|
if (groups.Count == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
randomSelectedBeatmaps.Push(new KeyValuePair<BeatmapGroup, BeatmapPanel>(selectedGroup, selectedGroup.SelectedPanel));
|
randomSelectedBeatmaps.Push(new KeyValuePair<BeatmapGroup, BeatmapPanel>(selectedGroup, selectedGroup.SelectedPanel));
|
||||||
|
|
||||||
var visibleGroups = getVisibleGroups();
|
var visibleGroups = getVisibleGroups();
|
||||||
@ -311,6 +314,9 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private void removeGroup(BeatmapGroup group)
|
private void removeGroup(BeatmapGroup group)
|
||||||
{
|
{
|
||||||
|
if (group == null)
|
||||||
|
return;
|
||||||
|
|
||||||
groups.Remove(group);
|
groups.Remove(group);
|
||||||
panels.Remove(group.Header);
|
panels.Remove(group.Header);
|
||||||
foreach (var p in group.BeatmapPanels)
|
foreach (var p in group.BeatmapPanels)
|
||||||
|
@ -384,7 +384,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private void promptDelete()
|
private void promptDelete()
|
||||||
{
|
{
|
||||||
if (Beatmap != null)
|
if (Beatmap != null && !Beatmap.IsDefault)
|
||||||
dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap));
|
dialogOverlay?.Push(new BeatmapDeleteDialog(Beatmap));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user