mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09: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:
Submodule osu-framework updated: 9a773e62eb...500a791577
@ -407,12 +407,14 @@ namespace osu.Game.Screens.Select
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float depth = i + (item is DrawableCarouselBeatmapSet ? -Items.Count : 0);
|
||||||
|
|
||||||
// Only add if we're not already part of the content.
|
// Only add if we're not already part of the content.
|
||||||
if (!scrollableContent.Contains(item))
|
if (!scrollableContent.Contains(item))
|
||||||
{
|
{
|
||||||
// Makes sure headers are always _below_ items,
|
// Makes sure headers are always _below_ items,
|
||||||
// and depth flows downward.
|
// and depth flows downward.
|
||||||
item.Depth = i + (item is DrawableCarouselBeatmapSet ? -Items.Count : 0);
|
item.Depth = depth;
|
||||||
|
|
||||||
switch (item.LoadState)
|
switch (item.LoadState)
|
||||||
{
|
{
|
||||||
@ -426,6 +428,10 @@ namespace osu.Game.Screens.Select
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
scrollableContent.ChangeChildDepth(item, depth);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is not actually useful right now, but once we have groups may well be.
|
// this is not actually useful right now, but once we have groups may well be.
|
||||||
|
Reference in New Issue
Block a user