Shortcut non-visible panels to avoid adding as drawables

This commit is contained in:
Dean Herbert 2017-12-15 00:11:47 +09:00
parent 48e53a76b0
commit 2e3332e3fe

View File

@ -498,6 +498,8 @@ namespace osu.Game.Screens.Select
// Only add if we're not already part of the content.
if (!scrollableContent.Contains(item))
{
if (!item.Item.Visible) continue;
// Makes sure headers are always _below_ items,
// and depth flows downward.
item.Depth = i + (item is DrawableCarouselBeatmapSet ? Items.Count : 0);