Fix a bug that prevents the lowest beatmap group from being selected if it is not completly on-screen.

This commit is contained in:
MrTheMake 2017-05-21 03:04:12 +02:00
parent 33ebc8fd49
commit 44cad4e0ac

View File

@ -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)