summaryrefslogtreecommitdiff
path: root/gtk2_ardour
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-01-15 01:06:13 +0000
committerCarl Hetherington <carl@carlh.net>2010-01-15 01:06:13 +0000
commit81fd8dd960c4ad681c9278b0921756e473956479 (patch)
treefda8fda32ba42193b9de8d8bd83bd18a14a46812 /gtk2_ardour
parent43e8e880dc25a52b6a929b9c5eebfbe348c43e95 (diff)
Centre playhead on zoom when it is the zoom focus. Myself and oofus think it better this way; it could be made optional if there is the will...
git-svn-id: svn://localhost/ardour2/branches/3.0@6492 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'gtk2_ardour')
-rw-r--r--gtk2_ardour/editor_ops.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc
index 278aaf9cd6..69d20fa68d 100644
--- a/gtk2_ardour/editor_ops.cc
+++ b/gtk2_ardour/editor_ops.cc
@@ -1587,11 +1587,8 @@ Editor::temporal_zoom (gdouble fpu)
break;
case ZoomFocusPlayhead:
- /* try to keep the playhead in the same place */
-
- where = playhead_cursor->current_frame;
-
- l = - ((new_page_size * ((where - current_leftmost)/(double)current_page)) - where);
+ /* centre playhead */
+ l = playhead_cursor->current_frame - (new_page_size * 0.5);
if (l < 0) {
leftmost_after_zoom = 0;