mirror of
https://github.com/osukey/osukey.git
synced 2025-07-22 19:00:05 +09:00
Update scroll position before applying any panel animations
In the case of automatic scroll requirements (ie. scroll to selected) we are delegating the animation logic to the panels themselves. In order to make this work correctly, the scroll operation needs to take effect before any animation updates are run.
This commit is contained in:
@ -573,6 +573,9 @@ namespace osu.Game.Screens.Select
|
|||||||
if (revalidateItems)
|
if (revalidateItems)
|
||||||
updateYPositions();
|
updateYPositions();
|
||||||
|
|
||||||
|
if (!scrollPositionCache.IsValid)
|
||||||
|
updateScrollPosition();
|
||||||
|
|
||||||
// This data is consumed to find the currently displayable range.
|
// This data is consumed to find the currently displayable range.
|
||||||
// This is the range we want to keep drawables for, and should exceed the visible range slightly to avoid drawable churn.
|
// This is the range we want to keep drawables for, and should exceed the visible range slightly to avoid drawable churn.
|
||||||
var newDisplayRange = getDisplayRange();
|
var newDisplayRange = getDisplayRange();
|
||||||
@ -653,14 +656,6 @@ namespace osu.Game.Screens.Select
|
|||||||
return (firstIndex, lastIndex);
|
return (firstIndex, lastIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void UpdateAfterChildren()
|
|
||||||
{
|
|
||||||
base.UpdateAfterChildren();
|
|
||||||
|
|
||||||
if (!scrollPositionCache.IsValid)
|
|
||||||
updateScrollPosition();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void beatmapRemoved(ValueChangedEvent<WeakReference<BeatmapSetInfo>> weakItem)
|
private void beatmapRemoved(ValueChangedEvent<WeakReference<BeatmapSetInfo>> weakItem)
|
||||||
{
|
{
|
||||||
if (weakItem.NewValue.TryGetTarget(out var item))
|
if (weakItem.NewValue.TryGetTarget(out var item))
|
||||||
|
Reference in New Issue
Block a user