[trunk] Whole rests corrupt measure on re-loading scores with time longer than 4/4

• Apr 22, 2011 - 23:09
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Setup: trunk rev. 4219 both under Win XP (Qt lib 4.7.0) and Ubuntu (Qt lib 4.6.2)

Step: Open either of the attached scores (same contents, one created with ver. 1.0 and one created with trunk)

Result: the whole (4/4) rest in measure 2 becomes a measure rest and the measure becomes 3/1 long rather than 2/1.

Notes:

1) the score created with ver. 1.0 can be open with ver 1.0 itself to check the original contents of measure 2.

2) This comes from two typos in function bool ChordRest::readProperties() (file chordrest.cpp), where line 369 should read:

if ((type() == REST) && (durationType()==Duration::V_WHOLE && duration() <= Fraction(4, 4))) {

instead of

if ((type() == REST) && (durationType()==Duration::V_WHOLE && duration() != Fraction(4.4))) {

3) The attached patch corrects the typos and add an explanatory comment

4) Priority set to critical as the issue may led to data corruption.

Attachment Size
trunk_chordrest_cpp_whole_rests.patch 1.23 KB

Comments