From 9a52cefd130dedb74d4a2480d221e8a9e2c8af25 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Wed, 6 Jan 2016 23:36:33 +1000 Subject: 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. --- libs/ardour/playlist.cc | 2 -- 1 file changed, 2 deletions(-) (limited to 'libs/ardour/playlist.cc') 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, 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, 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); -- cgit v1.2.3