diff --git a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/PathControlPointVisualiser.cs b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/PathControlPointVisualiser.cs
index b72e2d786b..065d4737a5 100644
--- a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/PathControlPointVisualiser.cs
+++ b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/PathControlPointVisualiser.cs
@@ -69,6 +69,39 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
controlPoints.BindTo(slider.Path.ControlPoints);
}
+ ///
+ /// Selects the corresponding to the given ,
+ /// and deselects all other s.
+ ///
+ public void SetSelectionTo(PathControlPoint pathControlPoint)
+ {
+ foreach (var p in Pieces)
+ p.IsSelected.Value = p.ControlPoint == pathControlPoint;
+ }
+
+ ///
+ /// Delete all visually selected s.
+ ///
+ ///
+ public bool DeleteSelected()
+ {
+ List toRemove = Pieces.Where(p => p.IsSelected.Value).Select(p => p.ControlPoint).ToList();
+
+ // Ensure that there are any points to be deleted
+ if (toRemove.Count == 0)
+ return false;
+
+ changeHandler?.BeginChange();
+ RemoveControlPointsRequested?.Invoke(toRemove);
+ changeHandler?.EndChange();
+
+ // Since pieces are re-used, they will not point to the deleted control points while remaining selected
+ foreach (var piece in Pieces)
+ piece.IsSelected.Value = false;
+
+ return true;
+ }
+
private void onControlPointsChanged(object sender, NotifyCollectionChangedEventArgs e)
{
switch (e.Action)
@@ -162,16 +195,6 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
SetSelectionTo(piece.ControlPoint);
}
- ///
- /// Selects the corresponding to the given ,
- /// and deselects all other s.
- ///
- public void SetSelectionTo(PathControlPoint pathControlPoint)
- {
- foreach (var p in Pieces)
- p.IsSelected.Value = p.ControlPoint == pathControlPoint;
- }
-
///
/// Attempts to set the given control point piece to the given path type.
/// If that would fail, try to change the path such that it instead succeeds
@@ -203,25 +226,6 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
[Resolved(CanBeNull = true)]
private IEditorChangeHandler changeHandler { get; set; }
- public bool DeleteSelected()
- {
- List toRemove = Pieces.Where(p => p.IsSelected.Value).Select(p => p.ControlPoint).ToList();
-
- // Ensure that there are any points to be deleted
- if (toRemove.Count == 0)
- return false;
-
- changeHandler?.BeginChange();
- RemoveControlPointsRequested?.Invoke(toRemove);
- changeHandler?.EndChange();
-
- // Since pieces are re-used, they will not point to the deleted control points while remaining selected
- foreach (var piece in Pieces)
- piece.IsSelected.Value = false;
-
- return true;
- }
-
#region Drag handling
private Vector2[] dragStartPositions;