summaryrefslogtreecommitdiff
path: root/libs/ardour/playlist.cc
diff options
context:
space:
mode:
authorTim Mayberry <mojofunk@gmail.com>2016-01-06 23:36:33 +1000
committerTim Mayberry <mojofunk@gmail.com>2016-01-14 07:05:04 +1000
commit9a52cefd130dedb74d4a2480d221e8a9e2c8af25 (patch)
tree509abbf9958e7a024404b86cd280cc82a60bb13f /libs/ardour/playlist.cc
parented8c88d697db94b04c85cef9341aaee87d346f63 (diff)
Fix bug 6725 regions incorrectly moved after tempo change when glued to BBT time
Playlist::_split_region copies the region and BBT_Time member is default constructed so position is bar 1 beat 1. The regions sample position is then initialized to the new position using the property list. Playlist::add_region_internal is then used to add new regions to the playlist which calls region->set_position() but as the region position has already been initialized it does not recompute the _bbt_time member based on the new sample position. Then when a tempo change occurs and Region::update_after_tempo_map_change is called the default initialized _bbt_time member is used to incorrectly determine the new sample position. So the change removes the initialization of the new region position using the property list initialization method and just lets the playlist set the position of the region in Playlist::add_region_internal so that the region _bbt_time member is recomputed in Region::set_position_internal.
Diffstat (limited to 'libs/ardour/playlist.cc')
-rw-r--r--libs/ardour/playlist.cc2
1 files changed, 0 insertions, 2 deletions
diff --git a/libs/ardour/playlist.cc b/libs/ardour/playlist.cc
index a4860eba99..41ec343cae 100644
--- a/libs/ardour/playlist.cc
+++ b/libs/ardour/playlist.cc
@@ -1408,7 +1408,6 @@ Playlist::duplicate_until (boost::shared_ptr<Region> region, framepos_t position
{
PropertyList plist;
- plist.add (Properties::position, region->position ());
plist.add (Properties::length, before);
plist.add (Properties::name, before_name);
plist.add (Properties::left_of_split, true);
@@ -1427,7 +1426,6 @@ Playlist::duplicate_until (boost::shared_ptr<Region> region, framepos_t position
{
PropertyList plist;
- plist.add (Properties::position, region->position() + before);
plist.add (Properties::length, after);
plist.add (Properties::name, after_name);
plist.add (Properties::right_of_split, true);