mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 02:32:55 +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:
|
case MouseButton.Left:
|
||||||
if (e.ControlPressed && IsSelected)
|
if (e.ControlPressed && IsSelected)
|
||||||
{
|
{
|
||||||
|
changeHandler?.BeginChange();
|
||||||
placementControlPoint = addControlPoint(e.MousePosition);
|
placementControlPoint = addControlPoint(e.MousePosition);
|
||||||
ControlPointVisualiser?.SetSelectionTo(placementControlPoint);
|
ControlPointVisualiser?.SetSelectionTo(placementControlPoint);
|
||||||
return true; // Stop input from being handled and modifying the selection
|
return true; // Stop input from being handled and modifying the selection
|
||||||
@ -153,16 +154,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
|||||||
[CanBeNull]
|
[CanBeNull]
|
||||||
private PathControlPoint placementControlPoint;
|
private PathControlPoint placementControlPoint;
|
||||||
|
|
||||||
protected override bool OnDragStart(DragStartEvent e)
|
protected override bool OnDragStart(DragStartEvent e) => placementControlPoint != null;
|
||||||
{
|
|
||||||
if (placementControlPoint != null)
|
|
||||||
{
|
|
||||||
changeHandler?.BeginChange();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void OnDrag(DragEvent e)
|
protected override void OnDrag(DragEvent e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user