From 44cad4e0acde2198881181ed9d78d9e59337cab5 Mon Sep 17 00:00:00 2001 From: MrTheMake Date: Sun, 21 May 2017 03:04:12 +0200 Subject: [PATCH] Fix a bug that prevents the lowest beatmap group from being selected if it is not completly on-screen. --- osu.Game/Screens/Select/BeatmapCarousel.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 4df24c1314..486b0795c4 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -409,7 +409,14 @@ namespace osu.Game.Screens.Select int firstIndex = yPositions.BinarySearch(Current - Panel.MAX_HEIGHT); if (firstIndex < 0) firstIndex = ~firstIndex; int lastIndex = yPositions.BinarySearch(Current + drawHeight); - if (lastIndex < 0) lastIndex = ~lastIndex; + if (lastIndex < 0) + { + lastIndex = ~lastIndex; + + // Add the first panel of the last visible beatmap group to preload its data. + if (lastIndex != yPositions.Count) + lastIndex++; + } // Add those panels within the previously found index range that should be displayed. for (int i = firstIndex; i < lastIndex; ++i)