diff options
author | Carl Hetherington <carl@carlh.net> | 2012-05-27 20:07:13 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-05-27 20:07:13 +0000 |
commit | f722858e43e3f26736254a27f5517019ae372305 (patch) | |
tree | b0fb8a86bb84a1db138b3eabade5ab7e61c9449c /gtk2_ardour/route_time_axis.cc | |
parent | d33c0d96fb1a44fe25115ab668495be8c712395e (diff) |
Patch from tophatdave to improve display of timestretch in
stacked layers mode (#4379).
git-svn-id: svn://localhost/ardour2/branches/3.0@12460 d708f5d6-7413-0410-9779-e7cbd77b26cf
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 |