1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-18 01:30:05 +08:00

Fix group toggle not working as expected anymore

This commit is contained in:
Dean Herbert
2025-06-17 23:15:17 +09:00
Unverified
parent 27d4ad7991
commit b74db44fde
+4 -4
View File
@@ -491,8 +491,8 @@ namespace osu.Game.Graphics.Carousel
}
else
{
// If current keyboard selection is not a group, toggle closest group and move keyboard selection to that group.
traverseSelection(-1, CheckValidForGroupSelection, false);
// If current keyboard selection is not a group, toggle the closest group and move keyboard selection to that group.
traverseSelection(-1, CheckValidForGroupSelection, skipFirst: false, activateExpandedItems: true);
}
return true;
@@ -577,7 +577,7 @@ namespace osu.Game.Graphics.Carousel
traverseSelection(direction, CheckValidForSetSelection);
}
private void traverseSelection(int direction, Func<CarouselItem, bool> predicate, bool skipFirst = true)
private void traverseSelection(int direction, Func<CarouselItem, bool> predicate, bool skipFirst = true, bool activateExpandedItems = false)
{
if (carouselItems == null || carouselItems.Count == 0) return;
@@ -616,7 +616,7 @@ namespace osu.Game.Graphics.Carousel
var newItem = carouselItems[newIndex];
if (!newItem.IsExpanded && predicate(newItem))
if ((activateExpandedItems || !newItem.IsExpanded) && predicate(newItem))
{
Activate(newItem);
return;