summaryrefslogtreecommitdiff
path: root/gtk2_ardour/editor_ops.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-05-10 00:48:42 +0000
committerCarl Hetherington <carl@carlh.net>2010-05-10 00:48:42 +0000
commitce1316a9076fa39cbfc6dbb06dd119aff31c89b7 (patch)
treeba8432a26eb2b0ebc5f1b454f421c23a86f1c6bc /gtk2_ardour/editor_ops.cc
parent8e76b4944ce6bc079cd787417f7d6a36a26314db (diff)
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
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r--gtk2_ardour/editor_ops.cc8
1 files changed, 7 insertions, 1 deletions
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");
}
}