1
0
mirror of https://github.com/ppy/osu synced 2025-03-20 18:08:25 +00:00

Merge pull request from smoogipoo/fix-editor-drag-exception

Fix exception when dragging after deleting object
This commit is contained in:
Dean Herbert 2020-06-23 21:45:58 +09:00 committed by GitHub
commit 92cf2dd3bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,6 +82,7 @@ namespace osu.Game.Screens.Edit.Compose.Components
case NotifyCollectionChangedAction.Remove: case NotifyCollectionChangedAction.Remove:
foreach (var o in args.OldItems) foreach (var o in args.OldItems)
SelectionBlueprints.FirstOrDefault(b => b.HitObject == o)?.Deselect(); SelectionBlueprints.FirstOrDefault(b => b.HitObject == o)?.Deselect();
break; break;
} }
}; };
@ -250,6 +251,9 @@ namespace osu.Game.Screens.Edit.Compose.Components
blueprint.Deselected -= onBlueprintDeselected; blueprint.Deselected -= onBlueprintDeselected;
SelectionBlueprints.Remove(blueprint); SelectionBlueprints.Remove(blueprint);
if (movementBlueprint == blueprint)
finishSelectionMovement();
} }
protected virtual void AddBlueprintFor(HitObject hitObject) protected virtual void AddBlueprintFor(HitObject hitObject)