mirror of https://github.com/ppy/osu
Ensure `TestBeatmapCarousel.Items` only returns actually visible items (and in correct order)
Turns out that items could be in an order that isn't the same as how things look on the carousel, so this change ensures that for testing purposes they are sorted by Y position. Also uses the `CarouselItem.Visible` flag to ensure that we don't have to wait for drawable fade transitions after a filter operation.
This commit is contained in:
parent
7a092ea995
commit
a14dede036
|
@ -1206,8 +1206,11 @@ public IEnumerable<DrawableCarouselItem> Items
|
|||
{
|
||||
get
|
||||
{
|
||||
foreach (var item in Scroll.Children)
|
||||
foreach (var item in Scroll.Children.OrderBy(c => c.Y))
|
||||
{
|
||||
if (item.Item?.Visible != true)
|
||||
continue;
|
||||
|
||||
yield return item;
|
||||
|
||||
if (item is DrawableCarouselBeatmapSet set)
|
||||
|
|
Loading…
Reference in New Issue