mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 20:07:29 +08:00
Merge pull request #17208 from peppy/blueprint-container-selected-items-bind
Automatically bind `BlueprintContainer`'s `SelectedItems` with its `SelectionHandler`
This commit is contained in:
commit
1813d73d4f
@ -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