From c1d5730c30430bd9314830f602c34787974f8e86 Mon Sep 17 00:00:00 2001 From: Gurjot Singh Date: Sat, 18 Jan 2014 22:02:26 +0530 Subject: [PATCH] save solo states for tracks --- include/track.h | 3 +++ src/core/track.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/track.h b/include/track.h index 1743a9c3a..cbb5faaeb 100644 --- a/include/track.h +++ b/include/track.h @@ -74,6 +74,7 @@ class trackContentObject : public Model, public JournallingObject { Q_OBJECT mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel); + mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel); public: trackContentObject( track * _track ); virtual ~trackContentObject(); @@ -154,6 +155,7 @@ private: midiTime m_length; BoolModel m_mutedModel; + BoolModel m_soloModel; friend class trackContentObjectView; @@ -349,6 +351,7 @@ class EXPORT track : public Model, public JournallingObject { Q_OBJECT mapPropertyFromModel(bool,isMuted,setMuted,m_mutedModel); + mapPropertyFromModel(bool,isSolo,setSolo,m_soloModel); public: typedef QVector tcoVector; diff --git a/src/core/track.cpp b/src/core/track.cpp index 0b1d97e6f..06d44ece6 100644 --- a/src/core/track.cpp +++ b/src/core/track.cpp @@ -1657,7 +1657,7 @@ void track::clone() /*! \brief Save this track's settings to file * - * We save the track type and its muted state, then append the track- + * We save the track type and its muted state and solo state, then append the track- * specific settings. Then we iterate through the trackContentObjects * and save all their states in turn. * @@ -1675,6 +1675,7 @@ void track::saveSettings( QDomDocument & _doc, QDomElement & _this ) _this.setAttribute( "type", type() ); _this.setAttribute( "name", name() ); _this.setAttribute( "muted", isMuted() ); + _this.setAttribute( "solo", isSolo() ); if( m_height >= MINIMAL_TRACK_HEIGHT ) { _this.setAttribute( "height", m_height ); @@ -1705,7 +1706,7 @@ void track::saveSettings( QDomDocument & _doc, QDomElement & _this ) /*! \brief Load the settings from a file * - * We load the track's type and muted state, then clear out our + * We load the track's type and muted state and solo state, then clear out our * current trackContentObject. * * Then we step through the QDomElement's children and load the @@ -1727,6 +1728,7 @@ void track::loadSettings( const QDomElement & _this ) _this.firstChild().toElement().attribute( "name" ) ); setMuted( _this.attribute( "muted" ).toInt() ); + setSolo( _this.attribute( "solo" ).toInt() ); if( m_simpleSerializingMode ) {