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.cc30
1 files changed, 30 insertions, 0 deletions
diff --git a/libs/ardour/region_factory.cc b/libs/ardour/region_factory.cc
index fba60fe0a0..4243d44cb7 100644
--- a/libs/ardour/region_factory.cc
+++ b/libs/ardour/region_factory.cc
@@ -73,6 +73,11 @@ RegionFactory::create (boost::shared_ptr<const Region> region, bool announce)
if (ret) {
ret->set_name (new_region_name(ret->name()));
+
+ if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
+ ret->set_position_lock_style (MusicTime);
+ }
+
map_add (ret);
/* pure copy constructor - no property list */
@@ -111,6 +116,11 @@ RegionFactory::create (boost::shared_ptr<Region> region, const PropertyList& pli
if (ret) {
ret->apply_changes (plist);
+
+ if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
+ ret->set_position_lock_style (MusicTime);
+ }
+
map_add (ret);
if (announce) {
@@ -148,6 +158,11 @@ RegionFactory::create (boost::shared_ptr<Region> region, frameoffset_t offset, c
if (ret) {
ret->apply_changes (plist);
+
+ if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
+ ret->set_position_lock_style (MusicTime);
+ }
+
map_add (ret);
if (announce) {
@@ -185,6 +200,11 @@ RegionFactory::create (boost::shared_ptr<Region> region, const SourceList& srcs,
if (ret) {
ret->apply_changes (plist);
+
+ if (ret->session().config.get_glue_new_regions_to_bars_and_beats ()) {
+ ret->set_position_lock_style (MusicTime);
+ }
+
map_add (ret);
if (announce) {
@@ -225,6 +245,11 @@ 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 ()) {
+ ret->set_position_lock_style (MusicTime);
+ }
+
map_add (ret);
if (announce) {
@@ -268,6 +293,11 @@ RegionFactory::create (SourceList& srcs, const XMLNode& node)
ret.reset ();
} else {
map_add (ret);
+
+ /* Don't fiddle with position_lock_style here as the region
+ description is coming from XML.
+ */
+
CheckNewRegion (ret);
}
}