added quirk for fixing projects with broken positions of TCOs inside BB-tracks

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1314 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-07-17 00:16:33 +00:00
parent e80cf4b9fc
commit f325bcd346
4 changed files with 32 additions and 0 deletions

View File

@@ -163,6 +163,21 @@ void bbTrackContainer::updateBBTrack( trackContentObject * _tco )
void bbTrackContainer::fixIncorrectPositions( void )
{
trackList tl = tracks();
for( trackList::iterator it = tl.begin(); it != tl.end(); ++it )
{
for( int i = 0; i < numOfBBs(); ++i )
{
( *it )->getTCO( i )->movePosition( midiTime( i, 0 ) );
}
}
}
void bbTrackContainer::play( void )
{
if( engine::getSong()->isPlaying() )

View File

@@ -925,6 +925,10 @@ void song::loadProject( const QString & _file_name )
node = node.nextSibling();
}
// quirk for fixing projects with broken positions of TCOs inside
// BB-tracks
engine::getBBTrackContainer()->fixIncorrectPositions();
// Connect controller links to their controllers
// now that everything is loaded
controllerConnection::finalizeConnections();