diff options
author | John Emmas <johne53@tiscali.co.uk> | 2015-01-30 14:55:23 +0000 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2015-01-30 14:55:23 +0000 |
commit | e874bc0be141405749f7359446a21f8c89c375c1 (patch) | |
tree | 3cbcddf98974731600f8330e224efefd0aa9084b /libs/ardour | |
parent | 0018ee2b02863b15beca2ff2f55fddf5840ffca9 (diff) |
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.
Diffstat (limited to 'libs/ardour')
-rw-r--r-- | libs/ardour/location.cc | 6 |
1 files 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; |