From 8a676d2bd4b05a8a12bdfb1b552aed680a37296f Mon Sep 17 00:00:00 2001 From: nick_m Date: Wed, 6 Jul 2016 04:36:48 +1000 Subject: [PATCH] Fix missing note divisor when creating regions, ensure an existing musical time is not altered. --- libs/ardour/region_factory.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc index fab9d8aaa8..e724683eda 100644 --- a/libs/ardour/region_factory.cc +++ b/libs/ardour/region_factory.cc @@ -83,11 +83,11 @@ RegionFactory::create (boost::shared_ptr region, bool announce, co if (ret) { ret->set_name (new_region_name(ret->name())); - if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) { + if (ret->session().config.get_glue_new_regions_to_bars_and_beats() && ret->position_lock_style() != MusicTime) { ret->set_position_lock_style (MusicTime); } - ret->set_position (region->position()); + ret->set_position (region->position(), sub_num); /* pure copy constructor - no property list */ if (announce) { @@ -127,7 +127,7 @@ RegionFactory::create (boost::shared_ptr region, const PropertyList& pli if (ret) { ret->apply_changes (plist); - if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) { + if (ret->session().config.get_glue_new_regions_to_bars_and_beats() && ret->position_lock_style() != MusicTime) { ret->set_position_lock_style (MusicTime); } @@ -168,7 +168,7 @@ RegionFactory::create (boost::shared_ptr region, frameoffset_t offset, c if (ret) { ret->apply_changes (plist); - if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) { + if (ret->session().config.get_glue_new_regions_to_bars_and_beats() && ret->position_lock_style() != MusicTime) { ret->set_position_lock_style (MusicTime); } @@ -209,7 +209,7 @@ RegionFactory::create (boost::shared_ptr region, const SourceList& srcs, if (ret) { ret->apply_changes (plist); - if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) { + if (ret->session().config.get_glue_new_regions_to_bars_and_beats() && ret->position_lock_style() != MusicTime) { ret->set_position_lock_style (MusicTime); } @@ -253,7 +253,7 @@ RegionFactory::create (const SourceList& srcs, const PropertyList& plist, bool a if (ret) { ret->apply_changes (plist); - if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) { + if (ret->session().config.get_glue_new_regions_to_bars_and_beats() && ret->position_lock_style() != MusicTime) { ret->set_position_lock_style (MusicTime); }