mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 00:53:56 +09:00
Fix reordering not declaring new position properly
Small bug fix
This commit is contained in:
@ -90,9 +90,11 @@ namespace osu.Game.Screens.Play
|
|||||||
var orderedByScore = this.OrderByDescending(i => i.TotalScore).ToList();
|
var orderedByScore = this.OrderByDescending(i => i.TotalScore).ToList();
|
||||||
var orderedPositions = this.OrderByDescending(i => i.ScorePosition.HasValue).ThenBy(i => i.ScorePosition).Select(i => i.ScorePosition).ToList();
|
var orderedPositions = this.OrderByDescending(i => i.ScorePosition.HasValue).ThenBy(i => i.ScorePosition).Select(i => i.ScorePosition).ToList();
|
||||||
|
|
||||||
|
var newDeclaredPosition = maxPosition + 1;
|
||||||
|
|
||||||
for (int i = 0; i < Count; i++)
|
for (int i = 0; i < Count; i++)
|
||||||
{
|
{
|
||||||
int newPosition = orderedPositions[i] ?? maxPosition + 1;
|
int newPosition = orderedPositions[i] ?? newDeclaredPosition;
|
||||||
|
|
||||||
SetLayoutPosition(orderedByScore[i], newPosition);
|
SetLayoutPosition(orderedByScore[i], newPosition);
|
||||||
orderedByScore[i].ScorePosition = DeclareNewPosition ? newPosition : orderedPositions[i];
|
orderedByScore[i].ScorePosition = DeclareNewPosition ? newPosition : orderedPositions[i];
|
||||||
|
Reference in New Issue
Block a user