1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00

Move SelectionHandler's SelectedItems binding to the base implementation

Until now it was up to each implementation to connect
`BlueprintContainer` to its `SelectionHandler`, which didn't make much
sense at all.
This commit is contained in:
Dean Herbert 2022-03-10 20:22:36 +09:00
parent d1f8fd01df
commit 68aedd63a7
2 changed files with 2 additions and 5 deletions

View File

@ -73,6 +73,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
SelectionHandler = CreateSelectionHandler();
SelectionHandler.DeselectAll = deselectAll;
SelectionHandler.SelectedItems.BindTo(SelectedItems);
AddRangeInternal(new[]
{

View File

@ -29,11 +29,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
// bring in updates from selection changes
EditorBeatmap.HitObjectUpdated += _ => Scheduler.AddOnce(UpdateTernaryStates);
SelectedItems.BindTo(EditorBeatmap.SelectedHitObjects);
SelectedItems.CollectionChanged += (sender, args) =>
{
Scheduler.AddOnce(UpdateTernaryStates);
};
SelectedItems.CollectionChanged += (sender, args) => Scheduler.AddOnce(UpdateTernaryStates);
}
protected override void DeleteItems(IEnumerable<HitObject> items) => EditorBeatmap.RemoveRange(items);