From 588cc3af74524a3f6bdae16c93ba0975f55fcc1e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 15 Aug 2013 11:43:37 -0400 Subject: [PATCH] check master sources when determining whether a region uses a source. should fix #5618 --- libs/ardour/region.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 source) const } } + for (SourceList::const_iterator i = _master_sources.begin(); i != _master_sources.end(); ++i) { + if (*i == source) { + return true; + } + + boost::shared_ptr ps = boost::dynamic_pointer_cast (*i); + + if (ps) { + if (ps->playlist()->uses_source (source)) { + return true; + } + } + } + return false; }