Automatically make first control point added to beatmap have timing data

This commit is contained in:
Dean Herbert 2022-05-31 21:49:32 +09:00
parent 79a17fc86a
commit f99bcb23a0

View File

@ -144,7 +144,14 @@ namespace osu.Game.Screens.Edit.Timing
private void addNew()
{
selectedGroup.Value = Beatmap.ControlPointInfo.GroupAt(clock.CurrentTime, true);
bool isFirstControlPoint = !Beatmap.ControlPointInfo.TimingPoints.Any();
var group = Beatmap.ControlPointInfo.GroupAt(clock.CurrentTime, true);
if (isFirstControlPoint)
group.Add(new TimingControlPoint());
selectedGroup.Value = group;
}
}
}