one hardcoded default colour less

This commit is contained in:
Hannu Haahti
2014-02-25 03:56:11 +02:00
parent 5b5feca4eb
commit fcfcee1895
3 changed files with 20 additions and 2 deletions

View File

@@ -41,6 +41,9 @@
#include "Effect.h"
#include "lmmsversion.h"
// bbTCO::defaultColor()
#include "bb_track.h"
DataFile::typeDescStruct
@@ -680,6 +683,18 @@ void DataFile::upgrade()
}
// new default colour for B&B tracks
QDomNodeList list = elementsByTagName( "bbtco" );
for( int i = 0; !list.item( i ).isNull(); ++i )
{
QDomElement el = list.item( i ).toElement();
unsigned int rgb = el.attribute( "color" ).toUInt();
if( rgb == qRgb( 64, 128, 255 ) )
{
el.setAttribute( "color", bbTCO::defaultColor() );
}
}
// Time-signature
if ( !m_head.hasAttribute( "timesig_numerator" ) )
{