[trunk] 1.0 'nudged' UserAccidental lost when loading with trunk (w/ patch)

• Apr 8, 2011 - 18:24
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Setup: MuseScore trunk rev. 4151 both under Win XP (Qt SDK 10.04, Qt lib 4.7.0) and under Ubuntu 9.10 (Qt SDK 10.02, Qt lib 4.6.2)

Steps:

1) Create and save with 1.0 a score with one 'nudged' (double-click and displace with arrows) UserAccidental (an accidental not required by the notation conventions but forced to appear); an example of such a score is attached (the accidental is the second C#, the first being a 'regular' accidental displaced).

2) Open this score with trunk (again sample is attached)

Result: the displaced user accidental is lost (the note IS altered but the accidental is no longer shown in either the non-displaced or displaced position).

Expected result: the displaced user accidental is maintained.

Notes

1) If the user accidental is not displaced, it is correctly read and displayed by trunk.

2) Priority set to critical as this leads to lost information.


Comments

Update:

The issue comes from the fact that in ver. 1.0 (or earlier) a <Note> can have both a <userAccidental> tag and an <Accidental> tag. Trunk does not link the two tags and creates an _accidental for each, the second overwriting the first (and generating a small memory leak in the process).

The attached patch to the note.cpp file (in function Note::read() ) combines, in older scores, the two tags in a single _accidental with properties from both.

Tested with several 1.0 files.

M.

Attachment Size
note_cpp_displaced_userAccidental.patch 3.14 KB