1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 20:07:25 +08:00

Make Timeline non-nullable

This commit is contained in:
Andrei Zavatski 2024-03-18 20:38:19 +03:00
parent 57399e9899
commit 0edc249637

View File

@ -15,7 +15,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
public partial class TimelineControlPointDisplay : TimelinePart<TimelineControlPointGroup> public partial class TimelineControlPointDisplay : TimelinePart<TimelineControlPointGroup>
{ {
[Resolved] [Resolved]
private Timeline? timeline { get; set; } private Timeline timeline { get; set; } = null!;
/// <summary> /// <summary>
/// The visible time/position range of the timeline. /// The visible time/position range of the timeline.
@ -42,7 +42,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
{ {
base.Update(); base.Update();
if (timeline == null || DrawWidth <= 0) return; if (DrawWidth <= 0) return;
(float, float) newRange = ( (float, float) newRange = (
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopLeft).X - TopPointPiece.WIDTH) / DrawWidth * Content.RelativeChildSize.X, (ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopLeft).X - TopPointPiece.WIDTH) / DrawWidth * Content.RelativeChildSize.X,