1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-21 11:22:55 +08:00

Terminate existing anchor create operation when object is deselected

This commit is contained in:
Bartłomiej Dach 2024-10-15 12:54:08 +02:00
parent 1a7acbac33
commit 232301f27d
No known key found for this signature in database

View File

@ -178,6 +178,9 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
{
base.OnDeselected();
if (placementControlPoint != null)
endControlPointPlacement();
updateVisualDefinition();
BodyPiece.RecyclePath();
}
@ -377,13 +380,16 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
protected override void OnMouseUp(MouseUpEvent e)
{
if (placementControlPoint != null)
{
if (IsDragged)
ControlPointVisualiser?.DragEnded();
endControlPointPlacement();
}
placementControlPoint = null;
changeHandler?.EndChange();
}
private void endControlPointPlacement()
{
if (IsDragged)
ControlPointVisualiser?.DragEnded();
placementControlPoint = null;
changeHandler?.EndChange();
}
protected override bool OnKeyDown(KeyDownEvent e)