From ce1316a9076fa39cbfc6dbb06dd119aff31c89b7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 10 May 2010 00:48:42 +0000 Subject: [PATCH] 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 --- gtk2_ardour/editor_ops.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index 25e0b0016b..0fe828e4ae 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -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"); } }