Fix TestScenePlaySongSelect failure due to detach clone depth

This commit is contained in:
Dean Herbert 2022-01-11 15:40:18 +09:00
parent 9e2ca583a3
commit cd88ccab4f

View File

@ -640,8 +640,9 @@ namespace osu.Game.Tests.Visual.SongSelect
AddStep("Get filtered icon", () =>
{
filteredBeatmap = songSelect.Carousel.SelectedBeatmapSet.Beatmaps.First(b => b.BPM < maxBPM);
int filteredBeatmapIndex = getBeatmapIndex(filteredBeatmap.BeatmapSet, filteredBeatmap);
var selectedSet = songSelect.Carousel.SelectedBeatmapSet;
filteredBeatmap = selectedSet.Beatmaps.First(b => b.BPM < maxBPM);
int filteredBeatmapIndex = getBeatmapIndex(selectedSet, filteredBeatmap);
filteredIcon = set.ChildrenOfType<FilterableDifficultyIcon>().ElementAt(filteredBeatmapIndex);
});