Fixed cloning of BB tracks
Not sure when it broke but cloning BB tracks erroneously cloned
positions of TCOs as well which made the source BB track have
two TCOs one upon the other while the destination BB did not have
any TCOs at all.
The fix is to save the position of the destination TCO before and
restore it manually after paste().
(cherry picked from commit c16e04c0dd)
This commit is contained in:
@@ -456,11 +456,21 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this )
|
||||
engine::getBBTrackContainer()->createTCOsForBB( dst );
|
||||
trackContainer::trackList tl =
|
||||
engine::getBBTrackContainer()->tracks();
|
||||
// copy TCOs of all tracks from source BB (at bar "src") to destination
|
||||
// TCOs (which are created if they do not exist yet)
|
||||
for( trackContainer::trackList::iterator it = tl.begin();
|
||||
it != tl.end(); ++it )
|
||||
{
|
||||
( *it )->getTCO( src )->copy();
|
||||
( *it )->getTCO( dst )->paste();
|
||||
|
||||
trackContentObject * d = ( *it )->getTCO( dst );
|
||||
// important: remember position of destination TCO as pasting
|
||||
// settings from source TCO will also restore the position of
|
||||
// source TCO
|
||||
const midiTime pos = d->startPosition();
|
||||
d->paste();
|
||||
// and move back to where it belongs!
|
||||
d->movePosition( pos );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user