1
0
mirror of https://github.com/ppy/osu.git synced 2026-06-08 04:24:10 +08:00

Fix CarouselGroupEagerSelect not invoking subclassed AddChild from AddChildren calls

This commit is contained in:
Dean Herbert
2022-01-20 21:57:16 +09:00
Unverified
parent a8ce2c5edf
commit 9a864267d2
@@ -55,10 +55,16 @@ namespace osu.Game.Screens.Select.Carousel
updateSelectedIndex();
}
private bool addingChildren;
public void AddChildren(IEnumerable<CarouselItem> items)
{
addingChildren = true;
foreach (var i in items)
base.AddChild(i);
AddChild(i);
addingChildren = false;
attemptSelection();
}
@@ -66,7 +72,8 @@ namespace osu.Game.Screens.Select.Carousel
public override void AddChild(CarouselItem i)
{
base.AddChild(i);
attemptSelection();
if (!addingChildren)
attemptSelection();
}
protected override void ChildItemStateChanged(CarouselItem item, CarouselItemState value)