Further fixes backward compatibility issue

This commit is contained in:
Wong Cho Ching
2014-02-01 18:09:46 +08:00
parent 7d96a2d533
commit c4b6a41aea
2 changed files with 7 additions and 0 deletions

View File

@@ -74,6 +74,7 @@ protected:
private:
//backward compatibility for <= 0.4.15
static int m_getCount;
static int m_loadCount;
static bool m_buggedFile;
} ;

View File

@@ -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;
}