- for (i = all_bbt_points->begin(); i != all_bbt_points->end(); ++i) {
-
- TempoMap::BBTPoint& p = (*i);
-
- switch (p.type) {
- case TempoMap::Bar:
- break;
-
- case TempoMap::Beat:
- xpos = p.frame / (gdouble) frames_per_unit;
-
- if (p.beat == 1) {
- color = color_map[cMeasureLineBeat];
- } else {
- color = color_map[cMeasureLineBar];
-
- /* only draw beat lines if the gaps between beats
- are large.
- */
-
- if (beat_spacing < 25.0) {
- break;
- }
- }
-
- if (cnt == 0 || xpos - last_xpos > 4.0) {
- line = get_time_line ();
- line->property_x1() = xpos;
- line->property_x2() = xpos;
- line->property_y2() = canvas_height;
- line->property_color_rgba() = color;
- line->raise_to_top();
- line->show();
- last_xpos = xpos;
- ++cnt;
- }
- break;
- }
+ if (tempo_lines == 0) {
+ tempo_lines = new TempoLines(*track_canvas, time_line_group, physical_screen_height(get_window()));