mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 19:03:08 +08:00
Fix control point additions without a drag not being undoable
This commit is contained in:
parent
cbda637d66
commit
c6a5ac1c5f
@ -139,6 +139,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
||||
case MouseButton.Left:
|
||||
if (e.ControlPressed && IsSelected)
|
||||
{
|
||||
changeHandler?.BeginChange();
|
||||
placementControlPoint = addControlPoint(e.MousePosition);
|
||||
ControlPointVisualiser?.SetSelectionTo(placementControlPoint);
|
||||
return true; // Stop input from being handled and modifying the selection
|
||||
@ -153,16 +154,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
||||
[CanBeNull]
|
||||
private PathControlPoint placementControlPoint;
|
||||
|
||||
protected override bool OnDragStart(DragStartEvent e)
|
||||
{
|
||||
if (placementControlPoint != null)
|
||||
{
|
||||
changeHandler?.BeginChange();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
protected override bool OnDragStart(DragStartEvent e) => placementControlPoint != null;
|
||||
|
||||
protected override void OnDrag(DragEvent e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user