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
This commit is contained in:
Carl Hetherington 2010-01-15 01:06:13 +00:00
parent 43e8e880dc
commit 81fd8dd960
1 changed files with 2 additions and 5 deletions

View File

@ -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;