save/restore name-property inside track-class

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1246 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-06-30 21:44:10 +00:00
parent cfd0fdc9c2
commit 1f6f51a542
4 changed files with 6 additions and 8 deletions

View File

@@ -1654,6 +1654,7 @@ void track::saveSettings( QDomDocument & _doc, QDomElement & _this )
{
_this.setTagName( "track" );
_this.setAttribute( "type", type() );
_this.setAttribute( "name", name() );
_this.setAttribute( "muted", isMuted() );
// ### TODO
// _this.setAttribute( "height", m_trackView->height() );
@@ -1695,6 +1696,9 @@ void track::loadSettings( const QDomElement & _this )
"settings-node!\n" );
}
setName( _this.hasAttribute( "name" ) ? _this.attribute( "name" ) :
_this.firstChild().toElement().attribute( "name" ) );
setMuted( _this.attribute( "muted" ).toInt() );
while( !m_trackContentObjects.empty() )
@@ -1719,7 +1723,6 @@ void track::loadSettings( const QDomElement & _this )
midiTime( 0 ) );
tco->restoreState( node.toElement() );
saveJournallingState( FALSE );
// addTCO( tco );
restoreJournallingState();
}
}

View File

@@ -424,7 +424,6 @@ trackContentObject * bbTrack::createTCO( const midiTime & _pos )
void bbTrack::saveTrackSpecificSettings( QDomDocument & _doc,
QDomElement & _this )
{
_this.setAttribute( "name", name() );
// _this.setAttribute( "icon", m_trackLabel->pixmapFile() );
/* _this.setAttribute( "current", s_infoMap[this] ==
engine::getBBEditor()->currentBB() );*/
@@ -442,7 +441,6 @@ void bbTrack::saveTrackSpecificSettings( QDomDocument & _doc,
void bbTrack::loadTrackSpecificSettings( const QDomElement & _this )
{
setName( _this.attribute( "name" ) );
/* if( _this.attribute( "icon" ) != "" )
{
m_trackLabel->setPixmapFile( _this.attribute( "icon" ) );

View File

@@ -134,7 +134,7 @@ instrumentTrack::instrumentTrack( trackContainer * _tc ) :
}
setName( tr( "Default" ) );
setName( tr( "Default preset" ) );
}
@@ -657,7 +657,6 @@ trackView * instrumentTrack::createView( trackContainerView * _tcv )
void instrumentTrack::saveTrackSpecificSettings( QDomDocument & _doc,
QDomElement & _this )
{
_this.setAttribute( "name", name() );
m_volumeModel.saveSettings( _doc, _this, "vol" );
m_panningModel.saveSettings( _doc, _this, "pan" );
m_pitchModel.saveSettings( _doc, _this, "pitch" );
@@ -688,7 +687,7 @@ void instrumentTrack::loadTrackSpecificSettings( const QDomElement & _this )
invalidateAllMyNPH();
engine::getMixer()->lock();
setName( _this.attribute( "name" ) );
m_volumeModel.loadSettings( _this, "vol" );
// compat-hacks - move to mmp::upgrade

View File

@@ -374,7 +374,6 @@ trackContentObject * sampleTrack::createTCO( const midiTime & )
void sampleTrack::saveTrackSpecificSettings( QDomDocument & _doc,
QDomElement & _this )
{
_this.setAttribute( "name", name() );//m_trackLabel->text() );
m_audioPort.getEffects()->saveState( _doc, _this );
#if 0
_this.setAttribute( "icon", m_trackLabel->pixmapFile() );
@@ -387,7 +386,6 @@ void sampleTrack::saveTrackSpecificSettings( QDomDocument & _doc,
void sampleTrack::loadTrackSpecificSettings( const QDomElement & _this )
{
setName( _this.attribute( "name" ) );
QDomNode node = _this.firstChild();
m_audioPort.getEffects()->clear();
while( !node.isNull() )