From b050e025dc3deaa8330ee02e350155033fc08421 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 30 May 2025 15:33:55 +0900 Subject: [PATCH] Fix carousel activating selection when only one valid item in list --- osu.Game/Graphics/Carousel/Carousel.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/osu.Game/Graphics/Carousel/Carousel.cs b/osu.Game/Graphics/Carousel/Carousel.cs index 9da4d0e187..625f6b3d38 100644 --- a/osu.Game/Graphics/Carousel/Carousel.cs +++ b/osu.Game/Graphics/Carousel/Carousel.cs @@ -530,6 +530,10 @@ namespace osu.Game.Graphics.Carousel do { newIndex = (newIndex + direction + carouselItems.Count) % carouselItems.Count; + + if (newIndex == originalIndex) + break; + var newItem = carouselItems[newIndex]; if (CheckValidForGroupSelection(newItem)) @@ -537,7 +541,7 @@ namespace osu.Game.Graphics.Carousel HandleItemActivated(newItem); return; } - } while (newIndex != originalIndex); + } while (true); } #endregion