[ver 1.0] Accidental offset in small staves corrupted by saving and reloading
Context: ver. 1.0 rev. 4262 (but applies to release version too)
Steps:
1) Create a score containing a small stave and one or more accidentals in that stave
2) Nudge the accidental(s) in the small stave of any amount
3) Save, close and reload repeatedly the score
Result:: the offset of the nudged accidental increases at each iteration of step 3), displacing the accidental more and more. Some small sample scores are attached showing the effect of the first 4 iterations.
Notes:
1) This happens because the accidental, when read (function Accidental::read()
in file accidental.cpp), does not know the stave it belongs to and then it cannot scale the offset accordingly to the stave size.
2) The attached patch solves the issue by setting the _track
member of the note the accidental belongs to (in function Chord::read()
, file chord.cpp) and of the accidental itself (function Note::read()
, file note.cpp), before the accidental is read from the file.
3) The same approach ( e->setTrack(track())
) is already used systematically for instance when reading elements of a measure (see function Measure::read()
in file measure.cpp).
4) Priority set to critical as the issue leads to data corruption.
Attachment | Size |
---|---|
ver10_smallstaff_accidentaloffset.patch | 1.01 KB |
ver10_smallstaff_accidentaloffset.mscz | 1.71 KB |
ver10_smallstaff_accidentaloffset_1.mscz | 1.69 KB |
ver10_smallstaff_accidentaloffset_2.mscz | 1.7 KB |
ver10_smallstaff_accidentaloffset_3.mscz | 1.7 KB |
Comments
Bump? ;-)
M.
fixed in trunk in r4460
I can't reproduce in MuseScore 1.0 on Windows, and with the branch at r4463.
@miwarre can you?
Sorry. I missed the step of saving everytime. Got it now.
Patch commited in the branch at r4464.
Bug fixed.
Bingo! Thanks!!
M.
Automatically closed -- issue fixed for 2 weeks with no activity.