- double x1, x2, y1, y2;
- track_canvas.get_scroll_region (x1, y1, x2, y2);
- //y2 = 1000000000.0f;
-
- for (i = current_bbt_points->begin(); i != current_bbt_points->end(); ++i) {
-
- p = (*i);
-
- switch (p.type) {
- case TempoMap::Bar:
- break;
-
- case TempoMap::Beat:
- xpos = frame_to_unit (p.frame);
-
- 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 < 15.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() = y2;
- 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);