C major key signature not transposed when changing instrument

• Mar 3, 2016 - 18:58
Type
Functional
Severity
S3 - Major
Status
closed
Project

Ubuntu 14.04, GIT commit: a6ec8aa

Only affects master it seems - it works in 2.0.2 and 2.0.3 when I tried it. But in master:

1) my first score
2) enter notes
3) right click staff, staff properties
4) change instrument / Bb clarinet

Result: notes transpose, key signature does not. Only affects C major.

I know this has broken and been fixed half a dozen times or more over the past few years. I suspect I broke this with some other transposition-related changes that for whatever reason weren't merged into 2.0.3 - maybe the fix to make instrument change text work with transposition? I will investigate further later.


Comments

Yes, I'm fairly certain I broke this with the aofrementioned change from September. transposeKeys() knows to only create new key signatures at tick 0, but when using the Change Instrument command, I am passing in -1 rather than 0 as the start tick. I think I know why - it relates to some issues we were having with the Change Instrument a year or two ago, and is probably correct overall. So I think I just need to fix transposeKeys() to also create key signatures for a start tick of -1. Still investigating, should have fix soon.