send enter events to EVERY newly entered item (ignore the bool return from the event...
[ardour.git] / gtk2_ardour / tempo_lines.cc
index a6177d2b1d9692d7b1e16261e0ecdb5b88e2b7e2..083b7a5cca8b4db2049dc4b784d6acf490cea4b0 100644 (file)
 
 using namespace std;
 
-TempoLines::TempoLines (ArdourCanvas::Canvas& canvas, ArdourCanvas::Group* group, double screen_height)
+TempoLines::TempoLines (ArdourCanvas::Canvas& canvas, ArdourCanvas::Group* group, double h)
        : _canvas (canvas)
        , _group (group)
-       , _height (screen_height)
+       , _height (h)
 {
 }
 
@@ -47,17 +47,13 @@ TempoLines::tempo_map_changed()
 void
 TempoLines::show ()
 {
-       for (Lines::iterator i = _lines.begin(); i != _lines.end(); ++i) {
-               (*i)->show();
-       }
+       _group->show ();
 }
 
 void
 TempoLines::hide ()
 {
-       for (Lines::iterator i = _lines.begin(); i != _lines.end(); ++i) {
-               (*i)->hide();
-       }
+       _group->hide ();
 }
 
 void
@@ -111,10 +107,16 @@ TempoLines::draw (const ARDOUR::TempoMap::BBTPointList::const_iterator& begin,
                        line->reparent (_group);
                } else {
                        line = new ArdourCanvas::Line (_group);
+                       CANVAS_DEBUG_NAME (line, "tempo measure line");
+                       line->set_ignore_events (true);
                }
 
-               line->set_x0 (xpos);
-               line->set_x1 (xpos);
+               /* move to 0.5 offset to ensure single pixel lines (see Cairo
+                * FAQ for info on why we do this).
+                */
+
+               line->set_x0 (xpos + 0.5);
+               line->set_x1 (xpos + 0.5);
                line->set_y0 (0.0);
                line->set_y1 (_height);
                line->set_outline_color (color);