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:
parent
d1f8fd01df
commit
68aedd63a7
@ -73,6 +73,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
||||
|
||||
SelectionHandler = CreateSelectionHandler();
|
||||
SelectionHandler.DeselectAll = deselectAll;
|
||||
SelectionHandler.SelectedItems.BindTo(SelectedItems);
|
||||
|
||||
AddRangeInternal(new[]
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user