[trunk] 1.0 'nudged' UserAccidental lost when loading with trunk (w/ patch)
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.
Attachment | Size |
---|---|
Test_UserAccidentals_displaced_1-0.mscx | 4.05 KB |
Test_UserAccidentals_displaced_resavedwithtrunk.mscx | 4.49 KB |
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.
patch applied in r4167
Automatically closed -- issue fixed for 2 weeks with no activity.