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:
parent
d0fd2ae432
commit
abdd417eb6
@ -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);
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user