mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Fix EditorClock
retaining a reference to potentially outdated ControlPointInfo
This commit is contained in:
@ -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
|
||||
/// </summary>
|
||||
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())
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Seek to the closest snappable beat from a time.
|
||||
/// </summary>
|
||||
|
Reference in New Issue
Block a user