diff --git a/osu.Game/Graphics/Carousel/Carousel.cs b/osu.Game/Graphics/Carousel/Carousel.cs index 5e2f2f369a..8db0c683c2 100644 --- a/osu.Game/Graphics/Carousel/Carousel.cs +++ b/osu.Game/Graphics/Carousel/Carousel.cs @@ -706,14 +706,6 @@ namespace osu.Game.Graphics.Carousel selectionValid.Validate(); } - if (!scrollToSelection.IsValid) - { - if (currentKeyboardSelection.YPosition != null) - Scroll.ScrollTo(currentKeyboardSelection.YPosition.Value - visibleHalfHeight + BleedTop); - - scrollToSelection.Validate(); - } - var range = getDisplayRange(); if (range != displayedRange) @@ -751,6 +743,19 @@ namespace osu.Game.Graphics.Carousel FilterAsync(); } + protected override void UpdateAfterChildren() + { + base.UpdateAfterChildren(); + + if (!scrollToSelection.IsValid) + { + if (currentKeyboardSelection.YPosition != null) + Scroll.ScrollTo(currentKeyboardSelection.YPosition.Value - visibleHalfHeight + BleedTop); + + scrollToSelection.Validate(); + } + } + protected virtual float GetPanelXOffset(Drawable panel) { Vector2 posInScroll = Scroll.ToLocalSpace(panel.ScreenSpaceDrawQuad.Centre);