diff --git a/src/core/track.cpp b/src/core/track.cpp index ef9f6d495..dbaa72aa8 100644 --- a/src/core/track.cpp +++ b/src/core/track.cpp @@ -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(); } } diff --git a/src/tracks/bb_track.cpp b/src/tracks/bb_track.cpp index 4eea76139..8fa98895d 100644 --- a/src/tracks/bb_track.cpp +++ b/src/tracks/bb_track.cpp @@ -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" ) ); diff --git a/src/tracks/instrument_track.cpp b/src/tracks/instrument_track.cpp index 024ed2981..b547c4b7f 100644 --- a/src/tracks/instrument_track.cpp +++ b/src/tracks/instrument_track.cpp @@ -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 diff --git a/src/tracks/sample_track.cpp b/src/tracks/sample_track.cpp index 31a71813c..60c7e8950 100644 --- a/src/tracks/sample_track.cpp +++ b/src/tracks/sample_track.cpp @@ -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() )