mirror of https://github.com/ppy/osu
Fix negative spinners
This commit is contained in:
parent
3d42973764
commit
98ab1f9862
|
@ -156,6 +156,9 @@ private void updateState()
|
|||
[Resolved]
|
||||
private EditorBeatmap beatmap { get; set; }
|
||||
|
||||
[Resolved]
|
||||
private IBeatSnapProvider beatSnapProvider { get; set; }
|
||||
|
||||
protected override void OnDrag(DragEvent e)
|
||||
{
|
||||
base.OnDrag(e);
|
||||
|
@ -178,7 +181,12 @@ protected override void OnDrag(DragEvent e)
|
|||
break;
|
||||
|
||||
case IHasEndTime endTimeHitObject:
|
||||
endTimeHitObject.EndTime = time;
|
||||
var snappedTime = beatSnapProvider.SnapTime(time);
|
||||
|
||||
if (endTimeHitObject.EndTime == snappedTime || snappedTime <= hitObject.StartTime)
|
||||
return;
|
||||
|
||||
endTimeHitObject.EndTime = snappedTime;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue