better handling of the inverse-push of solo-by-upstream. still not quite right, but...
[ardour.git] / libs / ardour / location.cc
index 6aa2f8faed80fba2a3a660628fa86332c064caf7..f855cb75cffff6c67248eaf0befb18d3461b714d 100644 (file)
@@ -89,7 +89,7 @@ Location::set_start (nframes64_t s)
                return -1;
        }
 
-       if (((is_auto_punch() || is_auto_loop()) && s >= _end) || s > _end) {
+       if (((is_auto_punch() || is_auto_loop()) && s >= _end) || (!is_mark() && s > _end)) {
                return -1;
        }
 
@@ -151,8 +151,10 @@ Location::set_end (nframes64_t e)
 int
 Location::set (nframes64_t start, nframes64_t end)
 {
-       set_start (start);
-       set_end (end);
+       int const s = set_start (start);
+       int const e = set_end (end);
+
+       return (s == 0 && e == 0) ? 0 : -1;
 }
 
 int