Applying offset to courtesy key signature creates corrupt key map (?)
Windows 10, GIT commit: 3c7a69d
First reported in https://musescore.org/en/node/148461. here are simple steps to reproduce from scratch:
1) my first score
2) add Eb key signature to measure 5 (first measure of second system)
3) select the courtesy signature at end of measure 4 (last measure of first system)
4) apply a horizontal offset
5) switch to continuous view
6) scroll forward
Result: the key signature never appears in the header at left even when the view is positioned entirely within the section in Eb
7) switch back to page view
Result: the key signature is gone
Another symptom of this: after step 4, instead of switching to continuous view,. try deleting the key signature in measure 5. The courtesy signature at the end of measure 4 remains.
Comments
I believe it will be hard to fix this in 2.0.3 without loosing any functionality...
When a courtesy key sig is moved, or its color is changed, or any other property changed, the courtesy keysig becomes "non generated". Courtesy keysig are created and removed by the layout process. They are only removed if they are generated. In this case, they are not generated, so they are not removed...
Something similar happens in continuous view, the fact that the keysig is "non generated" affects the key map...
In master, it's all handled very differently (and with a lot of bugs to fix...). So I'm not sure what to do in the 2.X branch... The only solution I can see is to disallow property changes for "generated" element and never change them to "non generated"...
That is what I was guessing. I know we've dealt with a couple of similar situations the same way.
Sort of related note - what should clicking a courtesy key signature then pressing "Delete" do? I'll bet a fair number of people might reasonably expect it to remove the courtesy signature (ie, set the real key signature to hide courtesy). Others might reasonably expect it to delete the *actual* key signature (especially if the change is to C major, as there is no actual key signature on the next system to select and delete). Maybe we need to consider what should actually be selected when clicking a courtesy signature?
Cannot reproduce on current master. The only issue I see is that after step 5 I see two same key signatures at measure 5, but it is worth creating separate issue.
Automatically closed -- issue fixed for 2 weeks with no activity.