Fix bug 6725 regions incorrectly moved after tempo change when glued to BBT time
authorTim Mayberry <mojofunk@gmail.com>
Wed, 6 Jan 2016 13:36:33 +0000 (23:36 +1000)
committerTim Mayberry <mojofunk@gmail.com>
Wed, 13 Jan 2016 21:05:04 +0000 (07:05 +1000)
commit9a52cefd130dedb74d4a2480d221e8a9e2c8af25
tree509abbf9958e7a024404b86cd280cc82a60bb13f
parented8c88d697db94b04c85cef9341aaee87d346f63
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