Fix cloning of B/B tracks (#6077)

Co-authored-by: Spekular <Spekular@users.noreply.github.com>
This commit is contained in:
István Szabó
2021-07-22 04:05:57 +02:00
committed by GitHub
parent 6f8c6dba82
commit 660056045c

View File

@@ -326,11 +326,15 @@ void BBTrackContainerView::clonePattern()
BBTrack *bbt = BBTrack::findBBTrack(cur_bb);
// Clone the track
Track *newTrack = bbt->clone();
if( bbt )
{
// Clone the track
Track *newTrack = bbt->clone();
bbtc->setCurrentBB( static_cast<BBTrack *>( newTrack )->index() );
// Track still have the TCOs which is undesirable in this case, clear the track
newTrack->lock();
newTrack->deleteTCOs();
newTrack->unlock();
// Track still have the TCOs which is undesirable in this case, clear the track
newTrack->lock();
newTrack->deleteTCOs();
newTrack->unlock();
}
}