mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Fix deleting the first control point not working
This commit is contained in:
@ -108,7 +108,14 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
foreach (var c in toRemove)
|
foreach (var c in toRemove)
|
||||||
|
{
|
||||||
|
// The first control point in the slider must have a type, so take it from the previous "first" one
|
||||||
|
// Todo: Should be handled within SliderPath itself
|
||||||
|
if (c == slider.Path.ControlPoints[0] && slider.Path.ControlPoints.Count > 1 && slider.Path.ControlPoints[1].Type.Value == null)
|
||||||
|
slider.Path.ControlPoints[1].Type.Value = slider.Path.ControlPoints[0].Type.Value;
|
||||||
|
|
||||||
slider.Path.ControlPoints.Remove(c);
|
slider.Path.ControlPoints.Remove(c);
|
||||||
|
}
|
||||||
|
|
||||||
// If there are 0 remaining control points, treat the slider as being deleted
|
// If there are 0 remaining control points, treat the slider as being deleted
|
||||||
if (slider.Path.ControlPoints.Count == 0)
|
if (slider.Path.ControlPoints.Count == 0)
|
||||||
|
Reference in New Issue
Block a user