diff --git a/src/core/DataFile.cpp b/src/core/DataFile.cpp index 398fd8ad2..dc2b1de57 100644 --- a/src/core/DataFile.cpp +++ b/src/core/DataFile.cpp @@ -914,14 +914,11 @@ void DataFile::upgrade_1_2_0_rc3() { int patternLength, steps; QDomElement el = patterns.item( j ).toElement(); - for( int k = 0; !patterns.item( k ).isNull(); ++k ) + if( el.attribute( "len" ) != "" ) { - if( el.attribute( "len" ) != "" ) - { - patternLength = el.attribute( "len" ).toInt(); - steps = patternLength / 12; - el.setAttribute( "steps", steps ); - } + patternLength = el.attribute( "len" ).toInt(); + steps = patternLength / 12; + el.setAttribute( "steps", steps ); } } }