mirror of
https://github.com/ppy/osu.git
synced 2025-02-22 01:23:24 +08:00
Unrevert null-colaescing/conditionals removal
This commit is contained in:
parent
b1134c3857
commit
7c4e54a1d4
@ -307,11 +307,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// If the beatmap's track has changed, this method must be called to keep the editor in a valid state.
|
/// If the beatmap's track has changed, this method must be called to keep the editor in a valid state.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void UpdateClockSource()
|
public void UpdateClockSource() => clock.ChangeSource(Beatmap.Value.Track);
|
||||||
{
|
|
||||||
var sourceClock = (IAdjustableClock)Beatmap.Value.Track ?? new StopwatchClock();
|
|
||||||
clock.ChangeSource(sourceClock);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void Save()
|
protected void Save()
|
||||||
{
|
{
|
||||||
@ -582,7 +578,7 @@ namespace osu.Game.Screens.Edit
|
|||||||
|
|
||||||
private void resetTrack(bool seekToStart = false)
|
private void resetTrack(bool seekToStart = false)
|
||||||
{
|
{
|
||||||
Beatmap.Value.Track?.Stop();
|
Beatmap.Value.Track.Stop();
|
||||||
|
|
||||||
if (seekToStart)
|
if (seekToStart)
|
||||||
{
|
{
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Timing;
|
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Screens.Edit;
|
using osu.Game.Screens.Edit;
|
||||||
@ -46,7 +45,7 @@ namespace osu.Game.Tests.Visual
|
|||||||
private void beatmapChanged(ValueChangedEvent<WorkingBeatmap> e)
|
private void beatmapChanged(ValueChangedEvent<WorkingBeatmap> e)
|
||||||
{
|
{
|
||||||
Clock.ControlPointInfo = e.NewValue.Beatmap.ControlPointInfo;
|
Clock.ControlPointInfo = e.NewValue.Beatmap.ControlPointInfo;
|
||||||
Clock.ChangeSource((IAdjustableClock)e.NewValue.Track ?? new StopwatchClock());
|
Clock.ChangeSource(e.NewValue.Track);
|
||||||
Clock.ProcessFrame();
|
Clock.ProcessFrame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user