diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-31 02:46:04 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-05-31 02:46:04 +0000 |
commit | 415d3a5018738287c9175d84ce8346a7b47da4ff (patch) | |
tree | 6b4600a2045f493978a0409d68c6975f16ada401 /libs/ardour/audioregion.cc | |
parent | 0354401e0016060701cf4869557cff3004511733 (diff) |
unfinished work on selection/HiG details, restore range ops destroyed by autoscroll changes
git-svn-id: svn://localhost/trunk/ardour2@544 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/audioregion.cc')
-rw-r--r-- | libs/ardour/audioregion.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/libs/ardour/audioregion.cc b/libs/ardour/audioregion.cc index 95201ab6f7..eb8dfbc123 100644 --- a/libs/ardour/audioregion.cc +++ b/libs/ardour/audioregion.cc @@ -1139,15 +1139,15 @@ AudioRegion::master_source_names () } bool -AudioRegion::region_list_equivalent (const AudioRegion& other) +AudioRegion::region_list_equivalent (const AudioRegion& other) const { return size_equivalent (other) && source_equivalent (other) && _name == other._name; } bool -AudioRegion::source_equivalent (const AudioRegion& other) +AudioRegion::source_equivalent (const AudioRegion& other) const { - SourceList::iterator i; + 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) { @@ -1166,7 +1166,13 @@ AudioRegion::source_equivalent (const AudioRegion& other) } bool -AudioRegion::equivalent (const AudioRegion& other) +AudioRegion::overlap_equivalent (const AudioRegion& other) const +{ + return coverage (other.first_frame(), other.last_frame()) != OverlapNone; +} + +bool +AudioRegion::equivalent (const AudioRegion& other) const { return _start == other._start && _position == other._position && @@ -1174,7 +1180,7 @@ AudioRegion::equivalent (const AudioRegion& other) } bool -AudioRegion::size_equivalent (const AudioRegion& other) +AudioRegion::size_equivalent (const AudioRegion& other) const { return _start == other._start && _length == other._length; |