Make zoom to session zoom to slightly more than the session (an extra 1% of session...
authorCarl Hetherington <carl@carlh.net>
Mon, 10 May 2010 00:48:42 +0000 (00:48 +0000)
committerCarl Hetherington <carl@carlh.net>
Mon, 10 May 2010 00:48:42 +0000 (00:48 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@7089 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/editor_ops.cc

index 25e0b0016bb0f74632130784eba5e5c4080ede4e..0fe828e4aeca942d5c1afc8233930f5d07b1fa51 100644 (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");
        }
 }