Adding time signature to measure containing key signature change makes the latter vanish

• Nov 8, 2013 - 00:15
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Windows 7, GIT commit: 3543170

1) open attached score
2) drag 2/4 time signature to measure 5 (the measure with the key change to D)

Result: key signature vanishes

The notes stay as appropriate for D, and the key signature appears on the next system, indicating it is really still in effect - it just isn't displaying any more.

Likely related to #21577: Removing time signature removes key signature

Attachment Size
signatures.mscz 1.54 KB

Comments

I could trace this issue down to function TrackList::write() (file libmscore/range.cpp, line 297 and following), when the measures after the time change are written back into measures suitable for the new time sig.

In that function, the case else if (e->type() == Element::KEYSIG) is empty. Presumably it is a temporary situation, as key change needs to be at the beginning of a measure, but the net result is that key sigs previously present in the score span subject to time change are not restored.

In fact, if the score is saved after the time sig is added and re-open, notes are shown with accidentals (or lack of) compatible with no key sig. So, the key sig IS NOT there.

M.