summaryrefslogtreecommitdiff
path: root/libs/ardour/region_factory.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour/region_factory.cc')
-rw-r--r--libs/ardour/region_factory.cc6
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")