1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-01 22:42:54 +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(); base.OnDeselected();
if (placementControlPoint != null)
endControlPointPlacement();
updateVisualDefinition(); updateVisualDefinition();
BodyPiece.RecyclePath(); BodyPiece.RecyclePath();
} }
@ -377,13 +380,16 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
protected override void OnMouseUp(MouseUpEvent e) protected override void OnMouseUp(MouseUpEvent e)
{ {
if (placementControlPoint != null) if (placementControlPoint != null)
{ endControlPointPlacement();
if (IsDragged) }
ControlPointVisualiser?.DragEnded();
placementControlPoint = null; private void endControlPointPlacement()
changeHandler?.EndChange(); {
} if (IsDragged)
ControlPointVisualiser?.DragEnded();
placementControlPoint = null;
changeHandler?.EndChange();
} }
protected override bool OnKeyDown(KeyDownEvent e) protected override bool OnKeyDown(KeyDownEvent e)