1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 16:27:26 +08:00

Stabilise ordering instead of simple reversing

Co-authored-by: Bartłomiej Dach <dach.bartlomiej@gmail.com>
This commit is contained in:
Dean Herbert 2021-03-25 15:24:59 +09:00 committed by GitHub
parent 71a361337d
commit 7b3336783f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -138,8 +138,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
Stack<double> currentConcurrentObjects = new Stack<double>();
// Reversing is done to enumerate in order of increasing StartTime.
foreach (var b in SelectionBlueprints.Reverse())
foreach (var b in SelectionBlueprints.OrderBy(b => b.HitObject.StartTime).ThenBy(b => b.HitObject.GetEndTime()))
{
while (currentConcurrentObjects.TryPeek(out double stackEndTime))
{