fix summary display (offset on-canvas rulers)
authorRobin Gareus <robin@gareus.org>
Wed, 29 Oct 2014 04:43:38 +0000 (05:43 +0100)
committerRobin Gareus <robin@gareus.org>
Wed, 29 Oct 2014 11:06:20 +0000 (12:06 +0100)
gtk2_ardour/editor_summary.cc

index fbe82400355e81a41555d8a3178f179e321684f3..85aed8291f66973f794b4f7eac2322485ac996d5 100644 (file)
@@ -490,7 +490,7 @@ EditorSummary::get_editor (pair<double, double>* x, pair<double, double>* y) con
                x->second = x->first + _editor->current_page_samples() * _x_scale;
                
                y->first = editor_y_to_summary (_editor->vertical_adjustment.get_value ());
-               y->second = editor_y_to_summary (_editor->vertical_adjustment.get_value () + _editor->visible_canvas_height());
+               y->second = editor_y_to_summary (_editor->vertical_adjustment.get_value () + _editor->visible_canvas_height() - _editor->get_trackview_group()->canvas_origin().y);
        }
 }
 
@@ -855,7 +855,7 @@ void
 EditorSummary::set_editor_y (double const y)
 {
        double y1 = summary_y_to_editor (y);
-       double const eh = _editor->visible_canvas_height();
+       double const eh = _editor->visible_canvas_height() - _editor->get_trackview_group()->canvas_origin().y;
        double y2 = y1 + eh;
 
        double const full_editor_height = _editor->_full_canvas_height;