diff options
author | Robin Gareus <robin@gareus.org> | 2014-10-29 06:35:55 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-10-29 12:06:20 +0100 |
commit | cca7ddf046a748d51cf1a5929615fcc8c499477d (patch) | |
tree | 86b637c67003032caac1bd754db6b5e72424c61b /gtk2_ardour/editor_ops.cc | |
parent | 300d765f176cd7966b12bcd02643bce6063b5fb6 (diff) |
fix vertical canvas scrolling
* properly account for hidden tracks
* allow to scroll to last track
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index b3b6b0bb45..1f23aa4319 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -1367,7 +1367,7 @@ Editor::scroll_tracks_up_line () bool Editor::scroll_down_one_track () { - TrackViewList::reverse_iterator next = track_views.rbegin(); + TrackViewList::reverse_iterator next = track_views.rend(); std::pair<TimeAxisView*,double> res; const double top_of_trackviews = vertical_adjustment.get_value(); @@ -1376,10 +1376,6 @@ Editor::scroll_down_one_track () continue; } - next = t; - if (next != track_views.rbegin()) { - --next; // moves "next" towards the lower/later tracks since it is a reverse iterator - } /* If this is the upper-most visible trackview, we want to display the one above it (next) @@ -1390,11 +1386,12 @@ Editor::scroll_down_one_track () if (res.first) { break; } + next = t; } /* move to the track below the first one that covers the */ - if (next != track_views.rbegin()) { + if (next != track_views.rend()) { ensure_time_axis_view_is_visible (**next, true); return true; } |