diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-04 22:46:51 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-01-04 22:46:51 +0000 |
commit | 72393f101ba2cae980838dd0d857719719ecc3d7 (patch) | |
tree | a54069a53df9879b75bfd6ae3455fd60cc1a1d30 /libs/ardour/region.cc | |
parent | 1f6684237c1711858c4853016131a70a6ef0edf9 (diff) |
allow region list selection of whole file regions to select every instance of a region that has any source relationship with that whole file region (from a logic feature that came up while writing the manual)
git-svn-id: svn://localhost/ardour2/branches/3.0@13779 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/region.cc')
-rw-r--r-- | libs/ardour/region.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc index c74ce4e419..952e8b5c9c 100644 --- a/libs/ardour/region.cc +++ b/libs/ardour/region.cc @@ -1407,6 +1407,25 @@ Region::source_equivalent (boost::shared_ptr<const Region> other) const return true; } +bool +Region::any_source_equivalent (boost::shared_ptr<const Region> other) const +{ + if (!other) { + return false; + } + + SourceList::const_iterator i; + SourceList::const_iterator io; + + for (i = _sources.begin(), io = other->_sources.begin(); i != _sources.end() && io != other->_sources.end(); ++i, ++io) { + if ((*i)->id() == (*io)->id()) { + return true; + } + } + + return false; +} + std::string Region::source_string () const { |