Extra key signatures are created for multimeasure rests in part when undoing

• Jul 20, 2016 - 23:24
Reported version
S4 - Minor

Linux. Affects 2.0.3. Not sure about master since #108086: Unexpected clefs and key signatures are shown in parts

1. Open extraKeySig2.mscz or extraKeySig3.mscz
2. File > Parts > New All
3. Do something (raise a note's pitch, reduce measure stretch, etc.)
4. Undo
5. View part

Result: an extra key signature appears for the multimeasure rest
Expected: no extra key signature

This bug is probably because of the generated key signature of a system in the score and, somehow, the undo.
For steps 3-4, even just undoing and redoing causes the extra key signature to appear.

Doing something twice then undoing twice (and repeat) can also lead to even more key signatures being added, leading to this in the part:

This effect doesn't seem to survive reload.


Can't reproduce here (Windows 7) with the 2.0.3, and with a recent nightly 8710008. Notice: with a release nighty build.
Cannot with your files, and also from scratch (2.0.3, and nightly) with steps: "My First Score" -> Enter for quarter notes in the first measure, and with D key signature -> Generate parts -> Change the pitch of the first note in main score -> Undo -> View part
Result: nothing unexpected here.

Because the line break was not mentioned in the steps of your first message, while it's the main point from what I see in this issue (step #4, below)

So, I can reproduce now with the 2.0.3 from scratch with these steps:

1) Template treble clef
2) D key signature -> Finish
3) Enter for quarter notes in the first measure
4) Add a line break into this first measure
5) Generate parts
6) Change a note's pitch in main score
7) Undo
8) View part

line break.jpg
Note : if the line break is added after creating parts, no issue.

Yes, I can reproduce.
Before that, my immediate reflex was to want to reproduce from scratch (and depending on your steps). While with my "First Score", I could not reproduce because the line breaks are located all the four measures.
And indeed, after Save and Reload, this issue is fixed.

Status (old) active fixed

I can't reproduce this issue with 70b00e6

with this test file: TEST key sig.mscz
and the following steps (as mentioned in previous comments), so:

1) Load this file
2) Generate parts -> New all -> Ok
3) Change the pitch of a note in main score
4) Undo
5) View part

From what I see, this issue has been fixed on last August 6 (by one of the 5 commits of this day)

- Don't work with this nightly (last one of August 5): da82e9d
With result:
part 5 août.jpg
- Works again as expected the next day with: 7fcd3aa
6 aout.jpg