New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix key sig bug #15479
Fix key sig bug #15479
Conversation
@mike-spa I dont know, why it was imortant, not to create C (empty) key signature, but I guess, there was some reason. MuseScore/src/engraving/libmscore/measure.cpp Lines 3868 to 3873 in 3f9b94d
MuseScore/src/engraving/libmscore/edit.cpp Lines 4652 to 4653 in 3f9b94d
MuseScore/src/engraving/libmscore/transpose.cpp Lines 620 to 630 in 3f9b94d
MuseScore/src/engraving/rw/measurerw.cpp Lines 408 to 413 in 3f9b94d
And possibly many others. |
I can provide a little historical background that might be relevant. There was a conscious design decision many years ago to represent C major by the absence of a key signature based on a general feeling that it was bad to have elements in the score that showed no visible trace of their existence. I personally never shared that feeling, but did what I could to make things work despite any number of complications that design caused. So some of those comments are likely mine, as is some of the code, but I'd be very happy to see it simplified. There is nothing wrong in my book with C major being represented by an explicit element. I don't even think the code actively requires C major to be handle with no key signature, as there are still ways you can end up with a C major key signatures element in the score. But they do tend to get cleaned up on save/reload, so you'd want to make sure that isn't still happening. |
Thanks both for providing context! To me, eliminating the keySig event from a staff just because it isn't graphically shown is a profound mistake. The fact that the key isn't shown is purely incidental, and managing the showing/not showing just requires some very simple logic. Eliminating it altogether, on the contrary, effectively deletes a fundamental piece of information from our score representation that can't be reconstructed, and it keeps causing bugs and problems everywhere. |
25de047
to
c66e117
Compare
Resolves: #15314