1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 20:13:22 +08:00

Remove slider changes

This commit is contained in:
vmaggioli 2021-02-03 10:03:38 -05:00
parent d0fd2ae432
commit abdd417eb6
No known key found for this signature in database
GPG Key ID: 5E31099CCBAEA383
2 changed files with 1 additions and 24 deletions

View File

@ -161,18 +161,6 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
checkControlPointSelected(1, false);
}
[Test]
public void TestZeroLengthSliderNotAllowed()
{
moveMouseToControlPoint(1);
dragMouseToControlPoint(0);
moveMouseToControlPoint(2);
dragMouseToControlPoint(0);
AddAssert("slider has non-zero duration", () => slider.Duration > 0);
}
private void moveHitObject()
{
AddStep("move hitobject", () =>
@ -201,13 +189,6 @@ namespace osu.Game.Rulesets.Osu.Tests.Editor
});
}
private void dragMouseToControlPoint(int index)
{
AddStep("hold down mouse button", () => InputManager.PressButton(MouseButton.Left));
moveMouseToControlPoint(index);
AddStep("release mouse button", () => InputManager.ReleaseButton(MouseButton.Left));
}
private void checkControlPointSelected(int index, bool selected)
=> AddAssert($"control point {index} {(selected ? "selected" : "not selected")}", () => blueprint.ControlPointVisualiser.Pieces[index].IsSelected.Value == selected);

View File

@ -226,11 +226,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
private void updatePath()
{
float expectedDistance = composer?.GetSnappedDistanceFromDistance(HitObject.StartTime, (float)HitObject.Path.CalculatedDistance) ?? (float)HitObject.Path.CalculatedDistance;
if (expectedDistance < 1)
return;
HitObject.Path.ExpectedDistance.Value = expectedDistance;
HitObject.Path.ExpectedDistance.Value = composer?.GetSnappedDistanceFromDistance(HitObject.StartTime, (float)HitObject.Path.CalculatedDistance) ?? (float)HitObject.Path.CalculatedDistance;
editorBeatmap?.Update(HitObject);
}