mirror of
https://github.com/ppy/osu.git
synced 2026-06-01 12:30:30 +08:00
Fix carousel activating selection when only one valid item in list
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user