fixed broken load/save of song-global automation
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1257 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -340,12 +340,14 @@ trackContentObjectView * automationPattern::createView( trackView * _tv )
|
||||
|
||||
bool automationPattern::isAutomated( const automatableModel * _m )
|
||||
{
|
||||
const trackContainer::trackList l = engine::getSong()->tracks() +
|
||||
trackContainer::trackList l = engine::getSong()->tracks() +
|
||||
engine::getBBTrackContainer()->tracks();
|
||||
l += engine::getSong()->globalAutomationTrack();
|
||||
for( trackContainer::trackList::const_iterator it = l.begin();
|
||||
it != l.end(); ++it )
|
||||
{
|
||||
if( ( *it )->type() == track::AutomationTrack )
|
||||
if( ( *it )->type() == track::AutomationTrack ||
|
||||
( *it )->type() == track::HiddenAutomationTrack )
|
||||
{
|
||||
const track::tcoVector & v = ( *it )->getTCOs();
|
||||
for( track::tcoVector::const_iterator j = v.begin();
|
||||
@@ -409,6 +411,7 @@ void automationPattern::resolveAllIDs( void )
|
||||
{
|
||||
trackContainer::trackList l = engine::getSong()->tracks() +
|
||||
engine::getBBTrackContainer()->tracks();
|
||||
l += engine::getSong()->globalAutomationTrack();
|
||||
for( trackContainer::trackList::iterator it = l.begin();
|
||||
it != l.end(); ++it )
|
||||
{
|
||||
|
||||
@@ -168,8 +168,8 @@ multimediaProject::multimediaProject( const QString & _in_file_name,
|
||||
node = node.nextSibling();
|
||||
}
|
||||
|
||||
if( _upgrade && root.hasAttribute( "creatorversion" )
|
||||
&& root.attribute( "creatorversion" ) != LMMS_VERSION )
|
||||
if( _upgrade && root.hasAttribute( "creatorversion" ) &&
|
||||
root.attribute( "creatorversion" ) != LMMS_VERSION )
|
||||
{
|
||||
upgrade();
|
||||
}
|
||||
|
||||
@@ -864,6 +864,11 @@ void song::loadProject( const QString & _file_name )
|
||||
m_playPos[Mode_PlaySong].m_timeLine->toggleLoopPoints( 0 );
|
||||
}
|
||||
|
||||
if( !mmp.content().firstChildElement( "track" ).isNull() )
|
||||
{
|
||||
m_globalAutomationTrack->restoreState( mmp.content().
|
||||
firstChildElement( "track" ) );
|
||||
}
|
||||
QDomNode node = mmp.content().firstChild();
|
||||
while( !node.isNull() )
|
||||
{
|
||||
@@ -959,6 +964,7 @@ bool song::saveProject( void )
|
||||
|
||||
saveState( mmp, mmp.content() );
|
||||
|
||||
m_globalAutomationTrack->saveState( mmp, mmp.content() );
|
||||
engine::getFxMixer()->saveState( mmp, mmp.content() );
|
||||
engine::getPianoRoll()->saveState( mmp, mmp.content() );
|
||||
engine::getAutomationEditor()->saveState( mmp, mmp.content() );
|
||||
|
||||
@@ -1704,7 +1704,7 @@ void track::loadSettings( const QDomElement & _this )
|
||||
while( !m_trackContentObjects.empty() )
|
||||
{
|
||||
delete m_trackContentObjects.front();
|
||||
m_trackContentObjects.erase( m_trackContentObjects.begin() );
|
||||
// m_trackContentObjects.erase( m_trackContentObjects.begin() );
|
||||
}
|
||||
|
||||
QDomNode node = _this.firstChild();
|
||||
|
||||
Reference in New Issue
Block a user