diff options
author | Robin Gareus <robin@gareus.org> | 2019-03-12 15:15:44 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-03-12 15:17:12 +0100 |
commit | d7314e0048b92a1694abc79727134ebd59e288fc (patch) | |
tree | 40e3b577b1d9da3c5b024c5d6f343ec51fc6f874 /libs/ardour/playlist.cc | |
parent | eea603d998be2f33a058c455fa6b86f6f10da815 (diff) |
Add a time+layer equivalence check
This is more useful than exact_equivalent() since _start offset
may not match in some cases (compounds, import, record with different
capture latencies).
However shared group editing (range, copy/paste) does result in
consistent layers and matching position+length.
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r-- | libs/ardour/playlist.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc index 3dce9123a9..bf95fde434 100644 --- a/libs/ardour/playlist.cc +++ b/libs/ardour/playlist.cc @@ -846,6 +846,13 @@ Playlist::get_equivalent_regions (boost::shared_ptr<Region> other, vector<boost: } } break; + case LayerTime: + for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { + if ((*i)->layer_and_time_equivalent (other)) { + results.push_back (*i); + } + } + break; case Enclosed: for (RegionList::iterator i = regions.begin(); i != regions.end(); ++i) { if ((*i)->enclosed_equivalent (other)) { |