mirror of
https://github.com/ppy/osu.git
synced 2026-06-04 05:43:42 +08:00
Fix editor's control point list refreshing multiple times for a single change
This commit is contained in:
@@ -109,8 +109,13 @@ namespace osu.Game.Screens.Edit.Timing
|
||||
controlPointGroups.BindTo(Beatmap.ControlPointInfo.Groups);
|
||||
controlPointGroups.BindCollectionChanged((_, _) =>
|
||||
{
|
||||
table.ControlGroups = controlPointGroups;
|
||||
changeHandler?.SaveState();
|
||||
// This callback can happen many times in a change operation. It gets expensive.
|
||||
// We really should be handling the `CollectionChanged` event properly.
|
||||
Scheduler.AddOnce(() =>
|
||||
{
|
||||
table.ControlGroups = controlPointGroups;
|
||||
changeHandler?.SaveState();
|
||||
});
|
||||
}, true);
|
||||
|
||||
table.OnRowSelected += drawable => scroll.ScrollIntoView(drawable);
|
||||
|
||||
Reference in New Issue
Block a user