mirror of
https://github.com/ppy/osu
synced 2025-02-01 02:41:52 +00:00
Revert "Improve performance of attemptSelection
using new cached count and LastSelected
"
This reverts commit 25df42630e
.
This commit is contained in:
parent
25e3a8e82e
commit
d81cabc063
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace osu.Game.Screens.Select.Carousel
|
namespace osu.Game.Screens.Select.Carousel
|
||||||
{
|
{
|
||||||
@ -100,7 +101,7 @@ namespace osu.Game.Screens.Select.Carousel
|
|||||||
if (State.Value != CarouselItemState.Selected) return;
|
if (State.Value != CarouselItemState.Selected) return;
|
||||||
|
|
||||||
// we only perform eager selection if none of our items are in a selected state already.
|
// we only perform eager selection if none of our items are in a selected state already.
|
||||||
if (LastSelected?.State.Value == CarouselItemState.Selected || TotalItemsNotFiltered == 0) return;
|
if (Items.Any(i => i.State.Value == CarouselItemState.Selected)) return;
|
||||||
|
|
||||||
PerformSelection();
|
PerformSelection();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user