mirror of
https://github.com/ppy/osu.git
synced 2025-03-21 22:27:23 +08:00
Fix editor's control point list refreshing multiple times for a single change
This commit is contained in:
parent
b1a26acdd0
commit
f2c0e7cf2e
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user