TrackContentObject: keep position in paste()
When calling TrackContentObject::paste(), only the content should be pasted, not the position. This fixes pasting for example note patterns and is also a more generic solution for the bug fixed in commit4ec5c6afe1. Closes #3005649. (cherry picked from commit5306f7b0ca)
This commit is contained in:
@@ -249,7 +249,9 @@ void trackContentObject::paste()
|
||||
{
|
||||
if( Clipboard::getContent( nodeName() ) != NULL )
|
||||
{
|
||||
const midiTime pos = startPosition();
|
||||
restoreState( *( Clipboard::getContent( nodeName() ) ) );
|
||||
movePosition( pos );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -462,15 +462,7 @@ void bbTrack::loadTrackSpecificSettings( const QDomElement & _this )
|
||||
it != tl.end(); ++it )
|
||||
{
|
||||
( *it )->getTCO( src )->copy();
|
||||
|
||||
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 );
|
||||
( *it )->getTCO( dst )->paste();
|
||||
}
|
||||
setName( tr( "Clone of %1" ).arg(
|
||||
_this.parentNode().toElement().attribute( "name" ) ) );
|
||||
|
||||
Reference in New Issue
Block a user