re-apply roll-delay after seek - fixes #5781
[ardour.git] / libs / ardour / region.cc
index 847a72b23fb04cbb9302d00bdac5f947a0002a2b..813fb93584b7cbcf69b3a2b20a1736c6df097978 100644 (file)
@@ -1138,7 +1138,7 @@ Region::state ()
        XMLNode *node = new XMLNode ("Region");
        char buf[64];
        char buf2[64];
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        const char* fe = NULL;
 
        /* custom version of 'add_properties (*node);'
@@ -1490,6 +1490,20 @@ Region::uses_source (boost::shared_ptr<const Source> source) const
                }
        }
 
+       for (SourceList::const_iterator i = _master_sources.begin(); i != _master_sources.end(); ++i) {
+               if (*i == source) {
+                       return true;
+               }
+
+               boost::shared_ptr<PlaylistSource> ps = boost::dynamic_pointer_cast<PlaylistSource> (*i);
+
+               if (ps) {
+                       if (ps->playlist()->uses_source (source)) {
+                               return true;
+                       }
+               }
+       }
+
        return false;
 }
 
@@ -1501,7 +1515,7 @@ Region::source_length(uint32_t n) const
 }
 
 bool
-Region::verify_length (framecnt_t len)
+Region::verify_length (framecnt_t& len)
 {
        if (source() && (source()->destructive() || source()->length_mutable())) {
                return true;