Update Russian translation
[ardour.git] / libs / canvas / ruler.cc
index 75c2d0f719404203750d431b7607f7d93700f830..9c1f78253fbf8b9084659b7afb7c55ead4e704f5 100644 (file)
@@ -103,13 +103,13 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
        }
 
        Rect self (item_to_window (get()));
-       boost::optional<Rect> i = self.intersection (area);
+       Rect i = self.intersection (area);
 
        if (!i) {
                return;
        }
 
-       Rect intersection (i.get());
+       Rect intersection (i);
 
        Distance height = self.height();
 
@@ -189,7 +189,7 @@ Ruler::render (Rect const & area, Cairo::RefPtr<Cairo::Context> cr) const
                        if (_divide_height >= 0) {
                                cr->move_to (pos.x + 2.0, self.y0 + _divide_height + logical.get_y() + 2.0); /* 2 pixel padding below divider */
                        } else {
-                               cr->move_to (pos.x + 2.0, self.y0 + logical.get_y());
+                               cr->move_to (pos.x + 2.0, self.y0 + logical.get_y() + .5 * (height - logical.get_height()));
                        }
                        layout->show_in_cairo_context (cr);
                }