diff options
author | David Robillard <d@drobilla.net> | 2010-12-21 17:03:16 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-21 17:03:16 +0000 |
commit | da89cd0c9b545c418fe2d6692844ff05779bb258 (patch) | |
tree | 6471696f49b6fedb07159bbf6e1389c0e48d0011 /libs/ardour/midi_region.cc | |
parent | 71986da212b641b53c4583d0dca02cc87c758291 (diff) |
Remove confuzzling offset_relative stuff from region construction (pre-properties "hangover").
This commit (in theory) only reorganizes code, not change actual functionality.
RegionFactory now uses a distinct Region constructor for each case, which is a bit easier to wrap around.
Note comment at region.cc:276, this case seems pretty weird to me (more hangover?).
git-svn-id: svn://localhost/ardour2/branches/3.0@8320 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/midi_region.cc')
-rw-r--r-- | libs/ardour/midi_region.cc | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/libs/ardour/midi_region.cc b/libs/ardour/midi_region.cc index 4b65e44e22..afae8eadc8 100644 --- a/libs/ardour/midi_region.cc +++ b/libs/ardour/midi_region.cc @@ -83,8 +83,21 @@ MidiRegion::MidiRegion (const SourceList& srcs) } /** Create a new MidiRegion, that is part of an existing one */ -MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other, frameoffset_t offset, bool offset_relative) - : Region (other, offset, offset_relative) +MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other) + : Region (other) + , _length_beats (Properties::length_beats, (Evoral::MusicalTime) 0) +{ + update_length_beats (); + register_properties (); + + assert(_name.val().find("/") == string::npos); + midi_source(0)->ModelChanged.connect_same_thread (_source_connection, boost::bind (&MidiRegion::model_changed, this)); + model_changed (); +} + +/** Create a new MidiRegion, that is part of an existing one */ +MidiRegion::MidiRegion (boost::shared_ptr<const MidiRegion> other, frameoffset_t offset) + : Region (other, offset) , _length_beats (Properties::length_beats, (Evoral::MusicalTime) 0) { update_length_beats (); |