From cbba71a0c85bd0052f3cfaaffa812b45b7c97321 Mon Sep 17 00:00:00 2001 From: Roy Vegard Ovesen Date: Mon, 15 Apr 2013 22:40:33 +0200 Subject: [PATCH] Fix navigation when located left of 60 sec. --- timeline/src/Timeline.C | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/timeline/src/Timeline.C b/timeline/src/Timeline.C index f74683a..6cdc0b9 100644 --- a/timeline/src/Timeline.C +++ b/timeline/src/Timeline.C @@ -918,11 +918,15 @@ Timeline::prev_line ( nframes_t *frame, bool bar ) const const nframes_t window = sample_rate() * 60; nframes_t start = 0; + nframes_t length = when; if ( when > window ) + { start = when - window; + length = window; + } - render_tempomap( start, when, prev_next_line_cb, &n ); + render_tempomap( start, length, prev_next_line_cb, &n ); *frame = n.closest;