mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Ensure visible items is greater than zero before trying to display a range
This commit is contained in:
@ -590,6 +590,8 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
displayedRange = newDisplayRange;
|
||||
|
||||
if (visibleItems.Count > 0)
|
||||
{
|
||||
var toDisplay = visibleItems.GetRange(displayedRange.first, displayedRange.last - displayedRange.first + 1);
|
||||
|
||||
foreach (var panel in ScrollableContent.Children)
|
||||
@ -621,6 +623,7 @@ namespace osu.Game.Screens.Select
|
||||
ScrollableContent.Add(panel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Finally, if the filtered items have changed, animate drawables to their new locations.
|
||||
// This is common if a selected/collapsed state has changed.
|
||||
|
Reference in New Issue
Block a user