mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Fix CarouselGroupEagerSelect
not invoking subclassed AddChild
from AddChildren
calls
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user