Try to be more accurate in drawing measure lines.

This commit is contained in:
Jonathan Moore Liles 2008-05-12 23:38:36 -05:00
parent 50897c6cd7
commit 30b4c1bb4b
1 changed files with 6 additions and 4 deletions

View File

@ -406,12 +406,14 @@ Timeline::draw_measure ( nframes_t when, int Y, int W, int H, Fl_Color color, me
tp = (Tempo_Point*)(*tpi);
const nframes_t ntpo = ntp ? ntp->start() : when + x_to_ts( W + 1 );
nframes_t ntpo = ntp ? ntp->start() : when + x_to_ts( W + 1 );
beat_inc = samples_per_minute / tp->tempo();
const int incx = ts_to_x( beat_inc );
/* lock to beat lines */
ntpo += (ntpo % beat_inc);
if ( incx < 8 )
continue;