diff options
author | David Robillard <d@drobilla.net> | 2006-07-23 12:03:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-07-23 12:03:19 +0000 |
commit | 60454cc8dc1ca5e1819b853b55916d52497d495c (patch) | |
tree | 3251e582556d511da71aa4c89835b333570004ea /libs/ardour/midi_region.cc | |
parent | 2f7622e72cfaf83661a68d9abcf61f353efc557d (diff) |
Split pretty much the entire GUI in 3. Audio and Midi "editor strips" and
associated stuff are now separated (with common things in base classes).
Extremely dirty and in progress, but builds, runs, and audio/midi tracks/busses
all look (and really are) distinct in the GUI.
git-svn-id: svn://localhost/ardour2/branches/midi@691 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_region.cc')
-rw-r--r-- | libs/ardour/midi_region.cc | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index 6fbb2e8923..d78506c1fc 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -501,24 +501,22 @@ MidiRegion::master_source_names () } bool -MidiRegion::region_list_equivalent (const MidiRegion& other) const +MidiRegion::source_equivalent (const Region& o) const { - return size_equivalent (other) && source_equivalent (other) && _name == other._name; -} + const MidiRegion* other = dynamic_cast<const MidiRegion*>(&o); + if (!other) + return false; -bool -MidiRegion::source_equivalent (const MidiRegion& other) const -{ 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) { + for (i = sources.begin(), io = other->sources.begin(); i != sources.end() && io != other->sources.end(); ++i, ++io) { if ((*i)->id() != (*io)->id()) { return false; } } - for (i = master_sources.begin(), io = other.master_sources.begin(); i != master_sources.end() && io != other.master_sources.end(); ++i, ++io) { + for (i = master_sources.begin(), io = other->master_sources.begin(); i != master_sources.end() && io != other->master_sources.end(); ++i, ++io) { if ((*i)->id() != (*io)->id()) { return false; } @@ -527,27 +525,6 @@ MidiRegion::source_equivalent (const MidiRegion& other) const return true; } -bool -MidiRegion::overlap_equivalent (const MidiRegion& other) const -{ - return coverage (other.first_frame(), other.last_frame()) != OverlapNone; -} - -bool -MidiRegion::equivalent (const MidiRegion& other) const -{ - return _start == other._start && - _position == other._position && - _length == other._length; -} - -bool -MidiRegion::size_equivalent (const MidiRegion& other) const -{ - return _start == other._start && - _length == other._length; -} - #if 0 int MidiRegion::exportme (Session& session, AudioExportSpecification& spec) |