mirror of
https://github.com/ppy/osu
synced 2024-12-17 12:25:19 +00:00
Merge pull request #2135 from peppy/fix-song-select-sort
Fix depth of already-visible panels not being updated after a sorting change
This commit is contained in:
commit
04d0e21ade
@ -1 +1 @@
|
||||
Subproject commit 9a773e62eb246206b918ba4fccf9f2507aaa4595
|
||||
Subproject commit 500a791577979669e47eece699d5bd8b9068ee4b
|
@ -407,12 +407,14 @@ namespace osu.Game.Screens.Select
|
||||
continue;
|
||||
}
|
||||
|
||||
float depth = i + (item is DrawableCarouselBeatmapSet ? -Items.Count : 0);
|
||||
|
||||
// Only add if we're not already part of the content.
|
||||
if (!scrollableContent.Contains(item))
|
||||
{
|
||||
// Makes sure headers are always _below_ items,
|
||||
// and depth flows downward.
|
||||
item.Depth = i + (item is DrawableCarouselBeatmapSet ? -Items.Count : 0);
|
||||
item.Depth = depth;
|
||||
|
||||
switch (item.LoadState)
|
||||
{
|
||||
@ -426,6 +428,10 @@ namespace osu.Game.Screens.Select
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
scrollableContent.ChangeChildDepth(item, depth);
|
||||
}
|
||||
}
|
||||
|
||||
// this is not actually useful right now, but once we have groups may well be.
|
||||
|
Loading…
Reference in New Issue
Block a user