- if (session == 0 || _show_measures == false) {
- return;
- }
-
- TempoMap::BBTPointList::iterator i;
- ArdourCanvas::SimpleLine *line;
- gdouble xpos;
- double x1, x2, y1, y2, beat_density;
-
- uint32_t beats = 0;
- uint32_t bars = 0;
- uint32_t color;
-
- if (current_bbt_points == 0 || current_bbt_points->empty()) {
- return;
- }
-
- track_canvas.get_scroll_region (x1, y1, x2, y2);
- y2 = TimeAxisView::hLargest*5000; // five thousand largest tracks should be enough.. :)
-
- /* get the first bar spacing */
-
- i = current_bbt_points->end();
- i--;
- bars = (*i).bar - (*current_bbt_points->begin()).bar;
- beats = current_bbt_points->size() - bars;
-
- beat_density = (beats * 10.0f) / track_canvas.get_width ();
-
- if (beat_density > 4.0f) {
- /* if the lines are too close together, they become useless
- */
+ if (session == 0 || _show_measures == false ||
+ !current_bbt_points || current_bbt_points->empty()) {