diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-08-15 11:43:37 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-08-15 11:43:37 -0400 |
commit | 588cc3af74524a3f6bdae16c93ba0975f55fcc1e (patch) | |
tree | 74231059859f3a12332f0269b37f5542c2d70045 | |
parent | 7a431f892ec6e7e2283885c474b680081c983762 (diff) |
check master sources when determining whether a region uses a source. should fix #5618
-rw-r--r-- | libs/ardour/region.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index 706dda4a0a..3b9dc308ec 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -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; } |