Ensure control point group exists after move

If the control point group moved was empty, it would not be created due
to a lack of ControlPointInfo.Add() calls.
This commit is contained in:
Bartłomiej Dach 2020-10-07 23:10:28 +02:00
parent b1029a124c
commit ac44f6f679
1 changed files with 2 additions and 1 deletions

View File

@ -111,7 +111,8 @@ private void changeSelectedGroupTime(in double time)
foreach (var cp in currentGroupItems)
Beatmap.Value.Beatmap.ControlPointInfo.Add(time, cp);
SelectedGroup.Value = Beatmap.Value.Beatmap.ControlPointInfo.GroupAt(time);
// the control point might not necessarily exist yet, if currentGroupItems was empty.
SelectedGroup.Value = Beatmap.Value.Beatmap.ControlPointInfo.GroupAt(time, true);
changeHandler?.EndChange();
}