Fix selection by directly comparing control points

Previously, all control points would get replaced, which led to
performance issues that was worked around in this PR. By comparing
control points, we're able to get good performance without requiring the
workaround.
This commit is contained in:
Dan Balasescu
2022-06-20 15:28:36 +09:00
parent 03ab6fc141
commit a922ea9b01
2 changed files with 24 additions and 12 deletions

View File

@ -139,12 +139,8 @@ namespace osu.Game.Screens.Edit.Timing
controlPointGroups.BindTo(Beatmap.ControlPointInfo.Groups);
controlPointGroups.BindCollectionChanged((sender, args) =>
{
// This AddOnce() works around performance issues from the LegacyEditorBeatmapPatcher re-initialising all control points every undo & redo.
Scheduler.AddOnce(() =>
{
table.ControlGroups = controlPointGroups;
changeHandler?.SaveState();
});
table.ControlGroups = controlPointGroups;
changeHandler?.SaveState();
}, true);
}