summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_mixer.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-01-15 23:50:40 +0000
committerCarl Hetherington <carl@carlh.net>2010-01-15 23:50:40 +0000
commitd73d3f3652edc8f249f483f1b3bd7594842130bc (patch)
treea1b107524c4361d1f2aaf8f4142dbe281d851a0e /gtk2_ardour/editor_mixer.cc
parent0c04eb8d83e53cf34716486ef85bd868c57f4cc1 (diff)
Restore old behaviour when updating the view when the playhead goes off it during roll.
git-svn-id: svn://localhost/ardour2/branches/3.0@6502 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour/editor_mixer.cc')
-rw-r--r--gtk2_ardour/editor_mixer.cc23
1 files changed, 19 insertions, 4 deletions
diff --git a/gtk2_ardour/editor_mixer.cc b/gtk2_ardour/editor_mixer.cc
index d3c40418fa..4d9b4b6acb 100644
--- a/gtk2_ardour/editor_mixer.cc
+++ b/gtk2_ardour/editor_mixer.cc
@@ -248,15 +248,30 @@ Editor::update_current_screen ()
} else {
if (frame < leftmost_frame) {
- /* moving left: end up with the playhead 3/4 of the way along the page */
- nframes64_t l = frame - (3 * current_page_frames() / 4);
+ /* moving left */
+ nframes64_t l = 0;
+ if (_session->transport_rolling()) {
+ /* rolling; end up with the playhead at the right of the page */
+ l = frame - current_page_frames ();
+ } else {
+ /* not rolling: end up with the playhead 3/4 of the way along the page */
+ l = frame - (3 * current_page_frames() / 4);
+ }
+
if (l < 0) {
l = 0;
}
+
center_screen_internal (l + (current_page_frames() / 2), current_page_frames ());
} else {
- /* moving right: end up with the playhead 1/4 of the way along the page */
- center_screen_internal (frame + (current_page_frames() / 4), current_page_frames ());
+ /* moving right */
+ if (_session->transport_rolling()) {
+ /* rolling: end up with the playhead on the left of the page */
+ center_screen_internal (frame + (current_page_frames() / 2), current_page_frames ());
+ } else {
+ /* not rolling: end up with the playhead 1/4 of the way along the page */
+ center_screen_internal (frame + (current_page_frames() / 4), current_page_frames ());
+ }
}
}
}