mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
Disallow inserting a group if one already exists with the current time value
This commit is contained in:
parent
81b5d7b79f
commit
0179586f78
@ -301,9 +301,11 @@ namespace osu.Game.Beatmaps.ControlPoints
|
||||
var newGroup = new ControlPointGroup(time);
|
||||
|
||||
int i = groups.BinarySearch(newGroup);
|
||||
if (i < 0) i = ~i;
|
||||
|
||||
groups.Insert(i, newGroup);
|
||||
if (i > 0)
|
||||
return groups[i];
|
||||
|
||||
groups.Insert(~i, newGroup);
|
||||
|
||||
return newGroup;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user