1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-21 15:07:23 +08:00

Fix editor's control point list refreshing multiple times for a single change

This commit is contained in:
Dean Herbert 2023-12-26 20:31:34 +09:00
parent b1a26acdd0
commit f2c0e7cf2e
No known key found for this signature in database

View File

@ -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);