check master sources when determining whether a region uses a source. should fix...
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 15 Aug 2013 15:43:37 +0000 (11:43 -0400)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 15 Aug 2013 15:43:37 +0000 (11:43 -0400)
libs/ardour/region.cc

index 706dda4a0a1ddd07b074a0a9b03346882d1a6101..3b9dc308ecec1632b7bf5fb8abb850cd29b150a8 100644 (file)
@@ -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;
 }