diff --git a/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapCarouselArtistGrouping.cs b/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapCarouselArtistGrouping.cs index 1178f89da6..cf71df914a 100644 --- a/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapCarouselArtistGrouping.cs +++ b/osu.Game.Tests/Visual/SongSelectV2/TestSceneBeatmapCarouselArtistGrouping.cs @@ -283,5 +283,18 @@ namespace osu.Game.Tests.Visual.SongSelectV2 CheckHasSelection(); } + + [Test] + public void TestManuallyCollapsingCurrentGroupAndOpeningAnother() + { + SelectNextSet(); + ToggleGroupCollapse(); + SelectNextGroup(); + AddUntilStep("no beatmap panels visible", () => GetVisiblePanels().Count(), () => Is.Zero); + + SelectNextSet(); + SelectNextSet(); + AddUntilStep("no beatmap panels visible", () => GetVisiblePanels().Count(), () => Is.Zero); + } } } diff --git a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs index 93356fef92..e75ad7e8ed 100644 --- a/osu.Game/Screens/SelectV2/BeatmapCarousel.cs +++ b/osu.Game/Screens/SelectV2/BeatmapCarousel.cs @@ -371,7 +371,7 @@ namespace osu.Game.Screens.SelectV2 if (userCollapsedGroup) { - if (grouping.BeatmapSetsGroupedTogether && CurrentGroupedBeatmap != null) + if (grouping.BeatmapSetsGroupedTogether && CurrentGroupedBeatmap != null && CheckModelEquality(group, CurrentGroupedBeatmap.Group)) setExpandedSet(new GroupedBeatmapSet(CurrentGroupedBeatmap.Group, CurrentGroupedBeatmap.Beatmap.BeatmapSet!)); userCollapsedGroup = false; }