Insert measure in front of score deletes key signature

• Aug 30, 2014 - 18:48
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Ubuntu Studio 14.04, GIT commit: 244f40d

1) new score, flute, key of D
2) select first measure
3) Ins (insert measure)

Result: the key signature is deleted. If you enter an "F" in the first measure, it enters as an F in the key of C (displays with no accidental, playback is F). If you enter an "F" in the second measure, it enters as as an "F" in the key of D (displays with no accidental, playback if F#).


Comments

This had been working but broke with fix for #29806: insert measure in front of key sig creates measure with wrong key sig; clefs too. Without fully understanding the code, I can attest that it "works" to use upper_bound() for tick == 0, lower_bound() otherwise.

The correspond change to the clef code got me curious, so I tested that. And actually, inserting a measure in front of a clef change currently does *not* work correctly - it seems it should use upper_bound no matter what the tick.

I don't like submitting fixes where I don't understand how they work, so I'm still investigating, but thought I'd report my findings so far.