1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 10:52:53 +08:00

Centralise length validation function

This commit is contained in:
Dean Herbert 2021-04-16 15:22:32 +09:00
parent 965a1ead36
commit d38e294d96
2 changed files with 3 additions and 1 deletions

View File

@ -135,7 +135,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
private void endCurve()
{
updateSlider();
EndPlacement(HitObject.Path.ExpectedDistance?.Value > 0);
EndPlacement(HitObject.Path.HasValidLength);
}
protected override void Update()

View File

@ -30,6 +30,8 @@ namespace osu.Game.Rulesets.Objects
/// </summary>
public readonly Bindable<double?> ExpectedDistance = new Bindable<double?>();
public bool HasValidLength => Distance > 0;
/// <summary>
/// The control points of the path.
/// </summary>