1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Merge pull request #10027 from peppy/fix-editor-zoom-bounds

This commit is contained in:
Dean Herbert 2020-09-01 16:12:36 +09:00 committed by GitHub
commit 9dca25bd58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
}, true);
}
private float getZoomLevelForVisibleMilliseconds(double milliseconds) => (float)(track.Length / milliseconds);
private float getZoomLevelForVisibleMilliseconds(double milliseconds) => Math.Max(1, (float)(track.Length / milliseconds));
/// <summary>
/// The timeline's scroll position in the last frame.