diff options
Diffstat (limited to 'gtk2_ardour/route_time_axis.cc')
-rw-r--r-- | gtk2_ardour/route_time_axis.cc | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/gtk2_ardour/route_time_axis.cc b/gtk2_ardour/route_time_axis.cc index 6b52e64572..d1a97630d5 100644 --- a/gtk2_ardour/route_time_axis.cc +++ b/gtk2_ardour/route_time_axis.cc @@ -757,13 +757,9 @@ RouteTimeAxisView::set_track_mode (TrackMode mode, bool apply_to_selection) } void -RouteTimeAxisView::show_timestretch (framepos_t start, framepos_t end) +RouteTimeAxisView::show_timestretch (framepos_t start, framepos_t end, int layers, int layer) { - double x1; - double x2; - double y2; - - TimeAxisView::show_timestretch (start, end); + TimeAxisView::show_timestretch (start, end, layers, layer); hide_timestretch (); @@ -802,14 +798,13 @@ RouteTimeAxisView::show_timestretch (framepos_t start, framepos_t end) timestretch_rect->show (); timestretch_rect->raise_to_top (); - x1 = start / _editor.get_current_zoom(); - x2 = (end - 1) / _editor.get_current_zoom(); - y2 = current_height() - 2; + double const x1 = start / _editor.get_current_zoom(); + double const x2 = (end - 1) / _editor.get_current_zoom(); timestretch_rect->property_x1() = x1; - timestretch_rect->property_y1() = 1.0; + timestretch_rect->property_y1() = current_height() * (layers - layer - 1) / layers; timestretch_rect->property_x2() = x2; - timestretch_rect->property_y2() = y2; + timestretch_rect->property_y2() = current_height() * (layers - layer) / layers; } void |