mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Improve timeline selection performance
But selecting a large number of hit objects is still very slow because all DHOs must be added and also `AddBlueprintFor` has quadratic behaviors
This commit is contained in:
@ -58,13 +58,19 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
{
|
||||
case NotifyCollectionChangedAction.Add:
|
||||
foreach (object o in args.NewItems)
|
||||
SelectionBlueprints.FirstOrDefault(b => b.Item == o)?.Select();
|
||||
{
|
||||
if (blueprintMap.TryGetValue((T)o, out var blueprint))
|
||||
blueprint.Select();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case NotifyCollectionChangedAction.Remove:
|
||||
foreach (object o in args.OldItems)
|
||||
SelectionBlueprints.FirstOrDefault(b => b.Item == o)?.Deselect();
|
||||
{
|
||||
if (blueprintMap.TryGetValue((T)o, out var blueprint))
|
||||
blueprint.Deselect();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user