mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 03:15:45 +08:00
Merge pull request #10414 from bdach/fix-current-time-button-crashes
This commit is contained in:
commit
5d55f00139
@ -113,7 +113,6 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
};
|
||||
|
||||
controlPoints = group.ControlPoints.GetBoundCopy();
|
||||
controlPoints.CollectionChanged += (_, __) => createChildren();
|
||||
}
|
||||
|
||||
[Resolved]
|
||||
@ -125,6 +124,12 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
createChildren();
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
controlPoints.CollectionChanged += (_, __) => createChildren();
|
||||
}
|
||||
|
||||
private void createChildren()
|
||||
{
|
||||
fill.ChildrenEnumerable = controlPoints.Select(createAttribute).Where(c => c != null);
|
||||
|
@ -111,7 +111,8 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user