mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 08:22:56 +08:00
Fix timeline not visually ordering hitobjects in a stable way
This commit is contained in:
parent
77969bb223
commit
cb48e5f158
@ -71,7 +71,13 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
// Put earlier blueprints towards the end of the list, so they handle input first
|
||||
int i = yObj.HitObject.StartTime.CompareTo(xObj.HitObject.StartTime);
|
||||
return i == 0 ? CompareReverseChildID(x, y) : i;
|
||||
|
||||
if (i != 0) return i;
|
||||
|
||||
// Fall back to end time if the start time is equal.
|
||||
i = yObj.HitObject.GetEndTime().CompareTo(xObj.HitObject.GetEndTime());
|
||||
|
||||
return i == 0 ? CompareReverseChildID(y, x) : i;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
|
||||
Stack<HitObject> currentConcurrentObjects = new Stack<HitObject>();
|
||||
|
||||
foreach (var b in SelectionBlueprints.OrderBy(b => b.HitObject.StartTime).ThenBy(b => b.HitObject.GetEndTime()))
|
||||
foreach (var b in SelectionBlueprints.Reverse())
|
||||
{
|
||||
// remove objects from the stack as long as their end time is in the past.
|
||||
while (currentConcurrentObjects.TryPeek(out HitObject hitObject))
|
||||
|
Loading…
Reference in New Issue
Block a user