diff --git a/osu-framework b/osu-framework index 0b9053ec3d..aa3e296968 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 0b9053ec3d39b486165992374752b280c5eeef06 +Subproject commit aa3e296968873208ca4460b00c0b82fe3aa8ff5c diff --git a/osu.Game.Rulesets.Mania/Timing/ControlPointContainer.cs b/osu.Game.Rulesets.Mania/Timing/ControlPointContainer.cs index 636c84d9dc..0a8bc2d44a 100644 --- a/osu.Game.Rulesets.Mania/Timing/ControlPointContainer.cs +++ b/osu.Game.Rulesets.Mania/Timing/ControlPointContainer.cs @@ -29,8 +29,6 @@ public class ControlPointContainer : Container private readonly List drawableControlPoints; - protected override IComparer DepthComparer => new HitObjectStartTimeComparer(); - public ControlPointContainer(IEnumerable timingChanges) { drawableControlPoints = timingChanges.Select(t => new DrawableControlPoint(t)).ToList(); @@ -131,6 +129,8 @@ public override void Add(Drawable drawable) /// private class AutoTimeRelativeContainer : Container { + protected override IComparer DepthComparer => new HitObjectReverseStartTimeComparer(); + public override void InvalidateFromChild(Invalidation invalidation) { // We only want to re-compute our size when a child's size or position has changed diff --git a/osu.Game/Rulesets/Objects/HitObjectStartTimeComparer.cs b/osu.Game/Rulesets/Objects/HitObjectStartTimeComparer.cs index e65bc4a99f..b089856dcb 100644 --- a/osu.Game/Rulesets/Objects/HitObjectStartTimeComparer.cs +++ b/osu.Game/Rulesets/Objects/HitObjectStartTimeComparer.cs @@ -17,7 +17,7 @@ public override int Compare(Drawable x, Drawable y) var hitObjectY = y as DrawableHitObject; // If either of the two drawables are not hit objects, fall back to the base comparer - if ((hitObjectX ?? hitObjectY) == null) + if (hitObjectX?.HitObject == null || hitObjectY?.HitObject == null) return base.Compare(x, y); // Compare by start time @@ -41,7 +41,7 @@ public override int Compare(Drawable x, Drawable y) var hitObjectY = y as DrawableHitObject; // If either of the two drawables are not hit objects, fall back to the base comparer - if ((hitObjectX ?? hitObjectY) == null) + if (hitObjectX?.HitObject == null || hitObjectY?.HitObject == null) return base.Compare(x, y); // Compare by start time