diff options
author | Ben Loftis <ben@harrisonconsoles.com> | 2020-01-25 11:34:46 -0600 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-01-26 19:36:23 +0100 |
commit | cf4d7387d2afe092bb110e1b14415fa07448ee55 (patch) | |
tree | 0e9747baa888459c7096724d81d23e2542776abc /gtk2_ardour/editor_ops.cc | |
parent | 2d07e72d40ca51149578a539560060b6ea3406fc (diff) |
Use a sensible min length for default session-duration
If the user tries to set the Start or End marker on an empty session,
apply some sensible defaults for the resulting session range.
Diffstat (limited to 'gtk2_ardour/editor_ops.cc')
-rw-r--r-- | gtk2_ardour/editor_ops.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gtk2_ardour/editor_ops.cc b/gtk2_ardour/editor_ops.cc index dd3e4f7a19..0ffae1ca5d 100644 --- a/gtk2_ardour/editor_ops.cc +++ b/gtk2_ardour/editor_ops.cc @@ -2267,8 +2267,8 @@ Editor::set_session_start_from_playhead () return; Location* loc; - if ((loc = _session->locations()->session_range_location()) == 0) { //should never happen - _session->set_session_extents (_session->audible_sample(), _session->audible_sample()); + if ((loc = _session->locations()->session_range_location()) == 0) { + _session->set_session_extents (_session->audible_sample(), _session->audible_sample() + 3 * 60 * _session->sample_rate()); } else { XMLNode &before = loc->get_state(); @@ -2294,7 +2294,7 @@ Editor::set_session_end_from_playhead () Location* loc; if ((loc = _session->locations()->session_range_location()) == 0) { //should never happen - _session->set_session_extents (_session->audible_sample(), _session->audible_sample()); + _session->set_session_extents (0, _session->audible_sample()); } else { XMLNode &before = loc->get_state(); |