mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 12:17:26 +08:00
Don't attempt to render timeline ticks until DrawWidth
is above zero
This commit is contained in:
parent
ccae721af2
commit
e227519b09
@ -77,9 +77,9 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
{
|
||||
base.Update();
|
||||
|
||||
if (timeline != null)
|
||||
{
|
||||
var newRange = (
|
||||
if (timeline == null || !(DrawWidth > 0)) return;
|
||||
|
||||
(float, float) newRange = (
|
||||
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopLeft).X - PointVisualisation.MAX_WIDTH * 2) / DrawWidth * Content.RelativeChildSize.X,
|
||||
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopRight).X + PointVisualisation.MAX_WIDTH * 2) / DrawWidth * Content.RelativeChildSize.X);
|
||||
|
||||
@ -91,7 +91,6 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
||||
if (nextMinTick == null || nextMaxTick == null || (visibleRange.min < nextMinTick || visibleRange.max > nextMaxTick))
|
||||
tickCache.Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
if (!tickCache.IsValid)
|
||||
createTicks();
|
||||
|
Loading…
Reference in New Issue
Block a user