Fix likely thinko in bbt ruler.
authorBen Loftis <ben@harrisonconsoles.com>
Fri, 10 Mar 2017 15:09:30 +0000 (09:09 -0600)
committerBen Loftis <ben@harrisonconsoles.com>
Fri, 10 Mar 2017 15:09:30 +0000 (09:09 -0600)
This fixes a bug for me:
  Measure lines appear & disappear during playback, at certain zoom scales.
  I think this is because the unecessary offset was causing beat_density to vary unnecessarily while rolling.

gtk2_ardour/editor_rulers.cc

index bdffd6fd39d7ff6e029861fd015db11a72389533..a32353f9c45a23ef7c6e23ae28cefb1f4d017968 100644 (file)
@@ -1113,7 +1113,7 @@ Editor::compute_bbt_ruler_scale (framepos_t lower, framepos_t upper)
 
        bbt_bars = _session->tempo_map().bbt_at_beat (ceil_upper_beat).bars - _session->tempo_map().bbt_at_beat (floor_lower_beat).bars;
 
-       beats = (ceil_upper_beat - floor_lower_beat) - bbt_bars;
+       beats = (ceil_upper_beat - floor_lower_beat);// - bbt_bars;  possible thinko; this fixes the problem (for me) where measure lines alternately appear&disappear while playing at certain zoom scales
        double beat_density = ((beats + 1) * ((double) (upper - lower) / (double) (1 + beat_after_upper_pos - beat_before_lower_pos))) / 5.0;
 
        /* Only show the bar helper if there aren't many bars on the screen */