Key signatures are lost 2.X->3.0

• Aug 18, 2018 - 11:48
Reported version
3.0
Type
Functional
Severity
S3 - Major
Status
closed
Project

Tested with self built MuseScore on OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (32-bit): 3.0.0, revision: 44304ca

  1. Open attached score
    Result: systems don't have key signatures until measure 57, where key signatures are changed.
    no_key_signatures.PNG
Attachment Size
2510026.mscz 93.71 KB

Comments

This is triggered by the E-flat Tuba part being written in the key of C. The code in Measure::addSystemHeader() that disables KeySig segments for key-of-C key signatures does not take into account the fact that other parts may not be written in the same key. It does, however, look at the KeySigs in the other staves, and if it finds one that is not generated, then it will not disable the segment. It could at the same time check whether the KeySig in the other staff indicates a key of C, and if it does not, then it will know to not disable the segment.

Status (old) fixed active
Status fixed active

Unfortunately, this change in the code causes errors when changing to the key of C. To see what I mean:

  1. Default "Untitled" score.
  2. Add a key signature.
  3. Delete the key signature, or add a "C" key signature.
    Result: Subsequent systems show the key signature from step 2.

I will try to come up with a solution to the original issue that does not introduce new errors. In the meantime, this code change should probably be reverted.