mirror of
https://github.com/ppy/osu.git
synced 2024-12-17 03:02:56 +08:00
Merge pull request #29762 from peppy/fix-beatmap-difficulty-splitting
Fix beatmap difficulties not being split out on first load
This commit is contained in:
commit
e88083adc1
@ -520,6 +520,18 @@ namespace osu.Game.Tests.Visual.SongSelect
|
|||||||
waitForSelection(set_count);
|
waitForSelection(set_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Solo]
|
||||||
|
[Test]
|
||||||
|
public void TestDifficultiesSplitOutOnLoad()
|
||||||
|
{
|
||||||
|
loadBeatmaps(new List<BeatmapSetInfo> { TestResources.CreateTestBeatmapSetInfo(diff_count) }, () => new FilterCriteria
|
||||||
|
{
|
||||||
|
Sort = SortMode.Difficulty,
|
||||||
|
});
|
||||||
|
|
||||||
|
checkVisibleItemCount(false, 3);
|
||||||
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
public void TestAddRemoveDifficultySort()
|
public void TestAddRemoveDifficultySort()
|
||||||
{
|
{
|
||||||
|
@ -137,6 +137,8 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private void loadNewRoot()
|
private void loadNewRoot()
|
||||||
{
|
{
|
||||||
|
beatmapsSplitOut = activeCriteria.SplitOutDifficulties;
|
||||||
|
|
||||||
// Ensure no changes are made to the list while we are initialising items.
|
// Ensure no changes are made to the list while we are initialising items.
|
||||||
// We'll catch up on changes via subscriptions anyway.
|
// We'll catch up on changes via subscriptions anyway.
|
||||||
BeatmapSetInfo[] loadableSets = detachedBeatmapSets!.ToArray();
|
BeatmapSetInfo[] loadableSets = detachedBeatmapSets!.ToArray();
|
||||||
@ -726,7 +728,6 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
if (activeCriteria.SplitOutDifficulties != beatmapsSplitOut)
|
if (activeCriteria.SplitOutDifficulties != beatmapsSplitOut)
|
||||||
{
|
{
|
||||||
beatmapsSplitOut = activeCriteria.SplitOutDifficulties;
|
|
||||||
loadNewRoot();
|
loadNewRoot();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user