summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_tempodisplay.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2006-01-28 13:33:54 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2006-01-28 13:33:54 +0000
commit81ef56fba962ff7b16658cc2831720947aacc8b5 (patch)
tree1b8531f990a2b62017bb1c9c9591b2eb30b99a72 /gtk2_ardour/editor_tempodisplay.cc
parent3caed4762ba1ecf4c2ec09fb5e3fd9cd4d339f21 (diff)
fix (mostly) measure lines and click box text and meter markings
git-svn-id: svn://localhost/trunk/ardour2@300 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_tempodisplay.cc')
-rw-r--r--gtk2_ardour/editor_tempodisplay.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_tempodisplay.cc b/gtk2_ardour/editor_tempodisplay.cc
index d7e35caa20..70c92dfcdd 100644
--- a/gtk2_ardour/editor_tempodisplay.cc
+++ b/gtk2_ardour/editor_tempodisplay.cc
@@ -135,7 +135,6 @@ Editor::get_time_line ()
if (free_measure_lines.empty()) {
line = new ArdourCanvas::SimpleLine (*time_line_group);
- // cerr << "measure line @ " << line << endl;
used_measure_lines.push_back (line);
} else {
line = free_measure_lines.front();
@@ -182,7 +181,7 @@ Editor::draw_measures ()
break;
case TempoMap::Beat:
- xpos = p.frame / (gdouble) frames_per_unit;
+ xpos = frame_to_unit (p.frame);
if (last_beat < xpos) {
beat_spacing = xpos - last_beat;
}
@@ -199,8 +198,8 @@ Editor::draw_measures ()
break;
case TempoMap::Beat:
- xpos = p.frame / (gdouble) frames_per_unit;
-
+ xpos = frame_to_unit (p.frame);
+
if (p.beat == 1) {
color = color_map[cMeasureLineBeat];
} else {
@@ -214,12 +213,12 @@ Editor::draw_measures ()
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_y2() = 1000;
line->property_color_rgba() = color;
line->raise_to_top();
line->show();