mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 08:43:01 +08:00
Merge pull request #3104 from peppy/fix-invalid-operation
Fix a potential InvalidOperationException when entering song select
This commit is contained in:
commit
dcf70bbd54
@ -79,8 +79,13 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
public override void Filter(FilterCriteria criteria)
|
public override void Filter(FilterCriteria criteria)
|
||||||
{
|
{
|
||||||
base.Filter(criteria);
|
base.Filter(criteria);
|
||||||
InternalChildren.Sort((x, y) => x.CompareTo(criteria, y));
|
|
||||||
InternalChildren.ForEach(c => c.Filter(criteria));
|
var children = new List<CarouselItem>(InternalChildren);
|
||||||
|
|
||||||
|
children.Sort((x, y) => x.CompareTo(criteria, y));
|
||||||
|
children.ForEach(c => c.Filter(criteria));
|
||||||
|
|
||||||
|
InternalChildren = children;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected virtual void ChildItemStateChanged(CarouselItem item, CarouselItemState value)
|
protected virtual void ChildItemStateChanged(CarouselItem item, CarouselItemState value)
|
||||||
|
Loading…
Reference in New Issue
Block a user