diff --git a/osu.Game.Tests/Visual/Editing/TestSceneEditorClock.cs b/osu.Game.Tests/Visual/Editing/TestSceneEditorClock.cs index ed58c59ff0..b38c9abfb6 100644 --- a/osu.Game.Tests/Visual/Editing/TestSceneEditorClock.cs +++ b/osu.Game.Tests/Visual/Editing/TestSceneEditorClock.cs @@ -102,6 +102,17 @@ namespace osu.Game.Tests.Visual.Editing AddUntilStep("time is clamped to track length", () => EditorClock.CurrentTime, () => Is.EqualTo(EditorClock.TrackLength)); } + [Test] + public void TestCurrentTimeDoubleTransform() + { + AddAssert("seek smoothly twice and current time is accurate", () => + { + EditorClock.SeekSmoothlyTo(1000); + EditorClock.SeekSmoothlyTo(2000); + return 2000 == EditorClock.CurrentTimeAccurate; + }); + } + protected override void Dispose(bool isDisposing) { Beatmap.Disabled = false; diff --git a/osu.Game/Screens/Edit/EditorClock.cs b/osu.Game/Screens/Edit/EditorClock.cs index d5ca6fc35e..773abaa737 100644 --- a/osu.Game/Screens/Edit/EditorClock.cs +++ b/osu.Game/Screens/Edit/EditorClock.cs @@ -154,7 +154,7 @@ namespace osu.Game.Screens.Edit /// The current time of this clock, include any active transform seeks performed via . /// public double CurrentTimeAccurate => - Transforms.OfType().FirstOrDefault()?.EndValue ?? CurrentTime; + Transforms.OfType().LastOrDefault()?.EndValue ?? CurrentTime; public double CurrentTime => underlyingClock.CurrentTime;