PartWriter::writeMeasures builds one MeasureCursor from the first measure's staff count
(src/private/mx/impl/PartWriter.cpp:311), and every MeasureWriter copies that cursor
(MeasureWriter.cpp:64-66). NoteWriter writes <staff> only when the cursor has more than one
staff (NoteWriter.cpp:406).
So when authored ScoreData has one staff in its first measure and two in a later one, the later
measure's second-staff notes are written without <staff> and read back on staff 1. The reader
never produces this shape, because it gives every measure the part's maximum staff count
(PartReader.cpp:147-204), so round-trip tests do not catch it.
Found while auditing silent recoveries for #432 (#439).
PartWriter::writeMeasuresbuilds oneMeasureCursorfrom the first measure's staff count(
src/private/mx/impl/PartWriter.cpp:311), and everyMeasureWritercopies that cursor(
MeasureWriter.cpp:64-66).NoteWriterwrites<staff>only when the cursor has more than onestaff (
NoteWriter.cpp:406).So when authored
ScoreDatahas one staff in its first measure and two in a later one, the latermeasure's second-staff notes are written without
<staff>and read back on staff 1. The readernever produces this shape, because it gives every measure the part's maximum staff count
(
PartReader.cpp:147-204), so round-trip tests do not catch it.Found while auditing silent recoveries for #432 (#439).