diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-10-13 17:57:33 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-10-13 17:57:33 +0000 |
commit | 7cded3707fc76aa6d796cbc86b5fc60b3aa40a03 (patch) | |
tree | 192d2f0674e57a922bf4e8ff1bde5c004a567710 /libs/ardour/region_factory.cc | |
parent | 13dc17bb4e40e5bba8c537019af6676ae0b6fec5 (diff) |
add new per-session MIDI-region-copy-is-fork: if set, all MIDI region copies will be independent from each other (via MIDIRegion::clone()); visible in Session properties editor under the Misc tab
git-svn-id: svn://localhost/ardour2/branches/3.0@10207 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/region_factory.cc')
-rw-r--r-- | libs/ardour/region_factory.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc index 3ca33cac01..fb195dba4c 100644 --- a/libs/ardour/region_factory.cc +++ b/libs/ardour/region_factory.cc @@ -58,7 +58,11 @@ RegionFactory::create (boost::shared_ptr<const Region> region, bool announce) } else if ((mr = boost::dynamic_pointer_cast<const MidiRegion>(region)) != 0) { - ret = boost::shared_ptr<Region> (new MidiRegion (mr, 0)); + if (mr->session().config.get_midi_copy_is_fork()) { + ret = mr->clone (); + } else { + ret = boost::shared_ptr<Region> (new MidiRegion (mr, 0)); + } } else { fatal << _("programming error: RegionFactory::create() called with unknown Region type") |