mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 01:27:20 +08:00
Renamed CollectionChanged event handler
This commit is contained in:
parent
aa87e0a44d
commit
bdbeb2bce4
@ -54,7 +54,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
|
|
||||||
// This makes sure HitObjects will have active Blueprints ready to display
|
// This makes sure HitObjects will have active Blueprints ready to display
|
||||||
// after clicking on an Editor Timestamp/Link
|
// after clicking on an Editor Timestamp/Link
|
||||||
Beatmap.SelectedHitObjects.CollectionChanged += keepHitObjectsAlive;
|
Beatmap.SelectedHitObjects.CollectionChanged += selectionChanged;
|
||||||
|
|
||||||
if (Composer != null)
|
if (Composer != null)
|
||||||
{
|
{
|
||||||
@ -149,7 +149,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
SelectedItems.AddRange(Beatmap.HitObjects.Except(SelectedItems).ToArray());
|
SelectedItems.AddRange(Beatmap.HitObjects.Except(SelectedItems).ToArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void keepHitObjectsAlive(object sender, NotifyCollectionChangedEventArgs e)
|
private void selectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (e == null || e.Action != NotifyCollectionChangedAction.Add || e.NewItems == null)
|
if (e == null || e.Action != NotifyCollectionChangedAction.Add || e.NewItems == null)
|
||||||
return;
|
return;
|
||||||
@ -180,7 +180,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
|
|||||||
{
|
{
|
||||||
Beatmap.HitObjectAdded -= AddBlueprintFor;
|
Beatmap.HitObjectAdded -= AddBlueprintFor;
|
||||||
Beatmap.HitObjectRemoved -= RemoveBlueprintFor;
|
Beatmap.HitObjectRemoved -= RemoveBlueprintFor;
|
||||||
Beatmap.SelectedHitObjects.CollectionChanged -= keepHitObjectsAlive;
|
Beatmap.SelectedHitObjects.CollectionChanged -= selectionChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
usageEventBuffer?.Dispose();
|
usageEventBuffer?.Dispose();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user