mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 12:42:54 +08:00
Make Timeline non-nullable
This commit is contained in:
parent
57399e9899
commit
0edc249637
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user