diff --git a/include/PeakController.h b/include/PeakController.h index 9d930446a..89691aa11 100644 --- a/include/PeakController.h +++ b/include/PeakController.h @@ -74,6 +74,7 @@ protected: private: //backward compatibility for <= 0.4.15 static int m_getCount; + static int m_loadCount; static bool m_buggedFile; } ; diff --git a/src/core/PeakController.cpp b/src/core/PeakController.cpp index 1069cbda1..7c5c80b3c 100644 --- a/src/core/PeakController.cpp +++ b/src/core/PeakController.cpp @@ -41,6 +41,7 @@ PeakControllerEffectVector PeakController::s_effects; int PeakController::m_getCount; +int PeakController::m_loadCount; bool PeakController::m_buggedFile; @@ -109,6 +110,10 @@ void PeakController::loadSettings( const QDomElement & _this ) Controller::loadSettings( _this ); int effectId = _this.attribute( "effectId" ).toInt(); + if( m_buggedFile == true ) + { + effectId = m_loadCount++; + } PeakControllerEffectVector::Iterator i; for( i = s_effects.begin(); i != s_effects.end(); ++i ) @@ -127,6 +132,7 @@ void PeakController::loadSettings( const QDomElement & _this ) //Backward compatibility function for bug in <= 0.4.15 void PeakController::initGetControllerBySetting() { + m_loadCount = 0; m_getCount = 0; m_buggedFile = false; }