mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 14:53:01 +08:00
Fix negative spinners
This commit is contained in:
parent
3d42973764
commit
98ab1f9862
@ -156,6 +156,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
[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 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
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
Block a user