summaryrefslogtreecommitdiff
path: root/libs/ardour/region.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2019-03-12 15:15:44 +0100
committerRobin Gareus <robin@gareus.org>2019-03-12 15:17:12 +0100
commitd7314e0048b92a1694abc79727134ebd59e288fc (patch)
tree40e3b577b1d9da3c5b024c5d6f343ec51fc6f874 /libs/ardour/region.cc
parenteea603d998be2f33a058c455fa6b86f6f10da815 (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/region.cc')
-rw-r--r--libs/ardour/region.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/ardour/region.cc b/libs/ardour/region.cc
index deffd11224..13dcdff326 100644
--- a/libs/ardour/region.cc
+++ b/libs/ardour/region.cc
@@ -1485,6 +1485,14 @@ Region::enclosed_equivalent (boost::shared_ptr<const Region> other) const
}
bool
+Region::layer_and_time_equivalent (boost::shared_ptr<const Region> other) const
+{
+ return _layer == other->_layer &&
+ _position == other->_position &&
+ _length == other->_length;
+}
+
+bool
Region::exact_equivalent (boost::shared_ptr<const Region> other) const
{
return _start == other->_start &&