mirror of
https://github.com/ppy/osu.git
synced 2025-02-05 13:43:22 +08:00
Terminate existing anchor drag operations when object is deselected
This commit is contained in:
parent
2d0e98c951
commit
1a7acbac33
@ -333,6 +333,9 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
base.Dispose(isDisposing);
|
||||
foreach (var p in Pieces)
|
||||
p.ControlPoint.Changed -= controlPointChanged;
|
||||
|
||||
if (draggedControlPointIndex >= 0)
|
||||
DragEnded();
|
||||
}
|
||||
|
||||
private void selectionRequested(PathControlPointPiece<T> piece, MouseButtonEvent e)
|
||||
@ -392,7 +395,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
|
||||
private Vector2[] dragStartPositions;
|
||||
private PathType?[] dragPathTypes;
|
||||
private int draggedControlPointIndex;
|
||||
private int draggedControlPointIndex = -1;
|
||||
private HashSet<PathControlPoint> selectedControlPoints;
|
||||
|
||||
private List<MenuItem> curveTypeItems;
|
||||
@ -473,7 +476,11 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
EnsureValidPathTypes();
|
||||
}
|
||||
|
||||
public void DragEnded() => changeHandler?.EndChange();
|
||||
public void DragEnded()
|
||||
{
|
||||
changeHandler?.EndChange();
|
||||
draggedControlPointIndex = -1;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user