mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Merge branch 'control-point-grouping' into no-auto-gen
This commit is contained in:
@ -30,11 +30,13 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
|
||||
public void Add(ControlPoint point)
|
||||
{
|
||||
point.AttachGroup(this);
|
||||
var existing = controlPoints.FirstOrDefault(p => p.GetType() == point.GetType());
|
||||
|
||||
foreach (var existing in controlPoints.Where(p => p.GetType() == point.GetType()).ToArray())
|
||||
if (existing != null)
|
||||
Remove(existing);
|
||||
|
||||
point.AttachGroup(this);
|
||||
|
||||
controlPoints.Add(point);
|
||||
ItemAdded?.Invoke(point);
|
||||
}
|
||||
|
Reference in New Issue
Block a user