From 6f91c569566e2805cb6ece5be303c2b9f71c3efe Mon Sep 17 00:00:00 2001 From: Umcaruje Date: Mon, 17 Oct 2016 17:46:13 +0200 Subject: [PATCH] Upgrade for inverted LEDs in Crossover equalizer (#3068) --- src/core/DataFile.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 89b6981ab..4e7e93378 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -868,10 +868,21 @@ void DataFile::upgrade_1_1_91() for( int i = 0; !list.item( i ).isNull(); ++i ) { QDomElement el = list.item( i ).toElement(); - if ( el.attribute( "name" ) == "plugin" && el.attribute( "value" ) == "vocoder-lmms" ) { + if( el.attribute( "name" ) == "plugin" && el.attribute( "value" ) == "vocoder-lmms" ) { el.setAttribute( "value", "vocoder" ); } } + + list = elementsByTagName( "crossoevereqcontrols" ); + for( int i = 0; !list.item( i ).isNull(); ++i ) + { + QDomElement el = list.item( i ).toElement(); + // invert the mute LEDs + for( int j = 1; j <= 4; ++j ){ + QString a = QString( "mute%1" ).arg( j ); + el.setAttribute( a, ( el.attribute( a ) == "0" ) ? "1" : "0" ); + } + } } @@ -1072,4 +1083,3 @@ void findIds(const QDomElement& elem, QList& idList) child = child.nextSiblingElement(); } } -