fix #18463: Wrong key signature inserted for transposing instrument

This commit is contained in:
lasconic 2013-09-11 17:33:43 +02:00
parent 2eeb3de920
commit d4510b8062

View file

@ -444,6 +444,11 @@ void Score::undoChangeKeySig(Staff* ostaff, int tick, KeySigEvent st)
KeySig* nks = new KeySig(score);
nks->setTrack(track);
int diff = -staff->part()->instr()->transpose().chromatic;
if (diff != 0 && !score->styleB(ST_concertPitch))
st.setAccidentalType(transposeKey(st.accidentalType(), diff));
nks->changeKeySigEvent(st);
nks->setParent(s);
if (links == 0)