mirror of
https://github.com/ppy/osu
synced 2024-12-17 04:15:37 +00:00
Don't bail on no beatmaps in database.
This commit is contained in:
parent
9b88798274
commit
9a66d766e9
@ -51,6 +51,9 @@ namespace osu.Game.GameModes.Play
|
||||
private void addBeatmapSets()
|
||||
{
|
||||
var sets = beatmaps.GetBeatmapSets();
|
||||
|
||||
if (sets.Length == 0) return;
|
||||
|
||||
foreach (var beatmapSet in sets)
|
||||
addBeatmapSet(beatmapSet);
|
||||
}
|
||||
@ -112,9 +115,12 @@ namespace osu.Game.GameModes.Play
|
||||
beatmaps = (game as OsuGameBase).Beatmaps;
|
||||
beatmaps.BeatmapSetAdded += bset => Scheduler.Add(() => addBeatmapSet(bset));
|
||||
addBeatmapSets();
|
||||
var first = setList.Children.First() as BeatmapGroup;
|
||||
first.Collapsed = false;
|
||||
selectedBeatmapSet = first.BeatmapSet;
|
||||
var first = setList.Children.FirstOrDefault() as BeatmapGroup;
|
||||
if (first != null)
|
||||
{
|
||||
first.Collapsed = false;
|
||||
selectedBeatmapSet = first.BeatmapSet;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
Loading…
Reference in New Issue
Block a user