mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 08:43:20 +08:00
Fix deleting the first control point not working
This commit is contained in:
parent
16f8341a02
commit
52dd7bf716
@ -108,7 +108,14 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
return false;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
// If there are 0 remaining control points, treat the slider as being deleted
|
||||
if (slider.Path.ControlPoints.Count == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user