From e874bc0be141405749f7359446a21f8c89c375c1 Mon Sep 17 00:00:00 2001 From: John Emmas Date: Fri, 30 Jan 2015 14:55:23 +0000 Subject: If 'force' is TRUE (when using 'Location::set_start()' or 'Location::set_end()') make sure we do actually force the value to get set. This gets us around a problem when converting a session from the old (Ardour2) format - where the Session Range (start) value was getting incorrectly set if we hadn't already set the end value. --- libs/ardour/location.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/location.cc b/libs/ardour/location.cc index fc961b2820..2e9125126b 100644 --- a/libs/ardour/location.cc +++ b/libs/ardour/location.cc @@ -220,7 +220,7 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute) assert (_end >= 0); return 0; - } else { + } else if (!force) { /* range locations must exceed a minimum duration */ if (_end - s < Config->get_range_location_minimum()) { return -1; @@ -251,7 +251,7 @@ Location::set_start (framepos_t s, bool force, bool allow_bbt_recompute) /** Set end position. * @param s New end. - * @param force true to force setting, even if the given new start is after the current end. + * @param force true to force setting, even if the given new end is before the current start. * @param allow_bbt_recompute True to recompute BBT end time from the new given end time. */ int @@ -288,7 +288,7 @@ Location::set_end (framepos_t e, bool force, bool allow_bbt_recompute) assert (_end >= 0); return 0; - } else { + } else if (!force) { /* range locations must exceed a minimum duration */ if (e - _start < Config->get_range_location_minimum()) { return -1; -- cgit v1.2.3