1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 11:22:57 +08:00

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

View File

@ -111,7 +111,8 @@ namespace osu.Game.Screens.Edit.Timing
foreach (var cp in currentGroupItems) foreach (var cp in currentGroupItems)
Beatmap.Value.Beatmap.ControlPointInfo.Add(time, cp); 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(); changeHandler?.EndChange();
} }