diff --git a/include/DataFile.h b/include/DataFile.h index e25a5ce4f..99c3b3ff0 100644 --- a/include/DataFile.h +++ b/include/DataFile.h @@ -122,6 +122,7 @@ private: void upgrade_0_4_0_20080622(); void upgrade_0_4_0_beta1(); void upgrade_0_4_0_rc2(); + void upgrade_1_1_0(); void upgrade_1_1_91(); void upgrade(); diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index bd0446350..8222b2d04 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -794,6 +794,20 @@ void DataFile::upgrade_0_4_0_rc2() } +void DataFile::upgrade_1_1_0() +{ + QDomNodeList list = elementsByTagName("fxchannel"); + for (int i = 1; !list.item(i).isNull(); ++i) + { + QDomElement el = list.item(i).toElement(); + QDomElement send = createElement("send"); + send.setAttribute("channel", "0"); + send.setAttribute("amount", "1"); + el.appendChild(send); + } +} + + void DataFile::upgrade_1_1_91() { // Upgrade to version 1.1.91 from some version less than 1.1.91 @@ -881,6 +895,10 @@ void DataFile::upgrade() { upgrade_0_4_0_rc2(); } + if( version < ProjectVersion("1.1.0", CompareType::Release) ) + { + upgrade_1_1_0(); + } if( version < ProjectVersion("1.1.91", CompareType::Release) ) { upgrade_1_1_91(); diff --git a/src/core/FxMixer.cpp b/src/core/FxMixer.cpp index 616e6070a..14f77bcf6 100644 --- a/src/core/FxMixer.cpp +++ b/src/core/FxMixer.cpp @@ -737,7 +737,6 @@ void FxMixer::loadSettings( const QDomElement & _this ) { clear(); QDomNode node = _this.firstChild(); - bool thereIsASend = false; while( ! node.isNull() ) { @@ -764,7 +763,6 @@ void FxMixer::loadSettings( const QDomElement & _this ) QDomElement chDataItem = chData.at(i).toElement(); if( chDataItem.nodeName() == QString( "send" ) ) { - thereIsASend = true; int sendTo = chDataItem.attribute( "channel" ).toInt(); allocateChannelsTo( sendTo ) ; FxRoute * fxr = createChannelSend( num, sendTo, 1.0f ); @@ -777,15 +775,6 @@ void FxMixer::loadSettings( const QDomElement & _this ) node = node.nextSibling(); } - // check for old format. 65 fx channels and no explicit sends. - if( ! thereIsASend && m_fxChannels.size() == 65 ) { - // create a send from every channel into master - for( int i=1; i