mirror of
https://github.com/osukey/osukey.git
synced 2025-05-15 02:27:33 +09: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();
|
base.Update();
|
||||||
|
|
||||||
if (timeline != null)
|
if (timeline == null || !(DrawWidth > 0)) return;
|
||||||
{
|
|
||||||
var newRange = (
|
(float, float) newRange = (
|
||||||
(ToLocalSpace(timeline.ScreenSpaceDrawQuad.TopLeft).X - PointVisualisation.MAX_WIDTH * 2) / DrawWidth * Content.RelativeChildSize.X,
|
(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);
|
(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))
|
if (nextMinTick == null || nextMaxTick == null || (visibleRange.min < nextMinTick || visibleRange.max > nextMaxTick))
|
||||||
tickCache.Invalidate();
|
tickCache.Invalidate();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!tickCache.IsValid)
|
if (!tickCache.IsValid)
|
||||||
createTicks();
|
createTicks();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user