diff --git a/osu.Game/Screens/Edit/EditorClock.cs b/osu.Game/Screens/Edit/EditorClock.cs
index ba83261731..86e5729196 100644
--- a/osu.Game/Screens/Edit/EditorClock.cs
+++ b/osu.Game/Screens/Edit/EditorClock.cs
@@ -25,7 +25,9 @@ namespace osu.Game.Screens.Edit
public double TrackLength => track.Value?.Length ?? 60000;
- public ControlPointInfo ControlPointInfo;
+ public ControlPointInfo ControlPointInfo => Beatmap.ControlPointInfo;
+
+ public IBeatmap Beatmap { get; set; }
private readonly BindableBeatDivisor beatDivisor;
@@ -42,25 +44,15 @@ namespace osu.Game.Screens.Edit
///
public bool IsSeeking { get; private set; }
- public EditorClock(IBeatmap beatmap, BindableBeatDivisor beatDivisor)
- : this(beatmap.ControlPointInfo, beatDivisor)
+ public EditorClock(IBeatmap beatmap = null, BindableBeatDivisor beatDivisor = null)
{
- }
+ Beatmap = beatmap ?? new Beatmap();
- public EditorClock(ControlPointInfo controlPointInfo, BindableBeatDivisor beatDivisor)
- {
- this.beatDivisor = beatDivisor;
-
- ControlPointInfo = controlPointInfo;
+ this.beatDivisor = beatDivisor ?? new BindableBeatDivisor();
underlyingClock = new DecoupleableInterpolatingFramedClock();
}
- public EditorClock()
- : this(new ControlPointInfo(), new BindableBeatDivisor())
- {
- }
-
///
/// Seek to the closest snappable beat from a time.
///
diff --git a/osu.Game/Tests/Visual/EditorClockTestScene.cs b/osu.Game/Tests/Visual/EditorClockTestScene.cs
index 34393fba7d..c2e9892735 100644
--- a/osu.Game/Tests/Visual/EditorClockTestScene.cs
+++ b/osu.Game/Tests/Visual/EditorClockTestScene.cs
@@ -5,7 +5,6 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Input.Events;
using osu.Game.Beatmaps;
-using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Screens.Edit;
namespace osu.Game.Tests.Visual
@@ -23,7 +22,7 @@ namespace osu.Game.Tests.Visual
protected EditorClockTestScene()
{
- Clock = new EditorClock(new ControlPointInfo(), BeatDivisor) { IsCoupled = false };
+ Clock = new EditorClock(new Beatmap(), BeatDivisor) { IsCoupled = false };
}
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
@@ -44,7 +43,7 @@ namespace osu.Game.Tests.Visual
private void beatmapChanged(ValueChangedEvent e)
{
- Clock.ControlPointInfo = e.NewValue.Beatmap.ControlPointInfo;
+ Clock.Beatmap = e.NewValue.Beatmap;
Clock.ChangeSource(e.NewValue.Track);
Clock.ProcessFrame();
}