Make zoom to session zoom to slightly more than the session (an extra 1% of session length either way)

git-svn-id: svn://localhost/ardour2/branches/3.0@7089 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2010-05-10 00:48:42 +00:00
parent 8e76b4944c
commit ce1316a907
1 changed files with 7 additions and 1 deletions

View File

@ -1776,7 +1776,13 @@ Editor::temporal_zoom_session ()
ENSURE_GUI_THREAD (*this, &Editor::temporal_zoom_session)
if (_session) {
temporal_zoom_by_frame (_session->current_start_frame(), _session->current_end_frame(), "zoom to _session");
nframes_t const l = _session->current_end_frame() - _session->current_start_frame();
double s = _session->current_start_frame() - l * 0.01;
if (s < 0) {
s = 0;
}
nframes_t const e = _session->current_end_frame() + l * 0.01;
temporal_zoom_by_frame (nframes_t (s), e, "zoom to _session");
}
}