mirror of
https://github.com/ppy/osu
synced 2025-01-09 07:39:46 +00:00
Fix changing ruleset at song selectnot scrolling the current selection back into view
This commit is contained in:
parent
a6cf6207aa
commit
8294dd0b71
@ -189,7 +189,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
root.AddChild(newSet);
|
||||
|
||||
applyActiveCriteria(false, false);
|
||||
applyActiveCriteria(false);
|
||||
|
||||
//check if we can/need to maintain our current selection.
|
||||
if (previouslySelectedID != null)
|
||||
@ -239,7 +239,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
Debug.Assert(bypassFilters);
|
||||
|
||||
applyActiveCriteria(false, true);
|
||||
applyActiveCriteria(false);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -396,7 +396,7 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
if (PendingFilter?.Completed == false)
|
||||
{
|
||||
applyActiveCriteria(false, false);
|
||||
applyActiveCriteria(false);
|
||||
Update();
|
||||
}
|
||||
}
|
||||
@ -406,10 +406,10 @@ namespace osu.Game.Screens.Select
|
||||
if (newCriteria != null)
|
||||
activeCriteria = newCriteria;
|
||||
|
||||
applyActiveCriteria(debounce, true);
|
||||
applyActiveCriteria(debounce);
|
||||
}
|
||||
|
||||
private void applyActiveCriteria(bool debounce, bool scroll)
|
||||
private void applyActiveCriteria(bool debounce)
|
||||
{
|
||||
if (root.Children.Any() != true) return;
|
||||
|
||||
@ -419,7 +419,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
root.Filter(activeCriteria);
|
||||
itemsCache.Invalidate();
|
||||
if (scroll) scrollPositionCache.Invalidate();
|
||||
scrollPositionCache.Invalidate();
|
||||
}
|
||||
|
||||
PendingFilter?.Cancel();
|
||||
|
Loading…
Reference in New Issue
Block a user