unable to change clef on first line of a new section

• Sep 5, 2015 - 12:14

If I try to drag a different clef onto beginning of staff 3 on meas 12, then the clef for that line doesn't change (although I can see it change in the next line). If I keep trying different clefs onto staff 3, then at some point I'm somehow able to cause staff 2 clef to change. On windows 8.1 release 2.0.2 and 3250979.

I'm trying to figure out minimum replication steps to produce this, but I was combining multi scores into an album.

Attachment Size
test-bass-clef-ottava.mscz 30.08 KB

Comments

Interesting. If you click on the bass clef and press [Del] it still shows as a bass clef but now you can drag another clef onto it to change it.

In reply to by ericfontainejazz

I think the problem is that *normally* when you add a clef to a a measure, the clef actually gets added to the end of the previous measure - not a courtesy clef, but the actual clef traditionally precedes the barline. That just isn't appropriate here. The relevant code is:

https://github.com/musescore/MuseScore/blob/35b9f498ceef8b5f0e298718dae…

If I skip that section of code, it works. But otherwise, the clef is actually being added at the end of the previous measure, which you can check by using the Debugger window within MuseScore. Notice the key signature changes if appropriate as well.

I'm thinking the real fix is not to skip those lines, but to force the clef in the current measure to be regenerated correctly. I guess it is set to non-generated and that is why it isn't happening. Deleting the clef sets it back to generated, which is why the subsequent operation works.

Unfortunately everything having to do with adding, changing, and deleting clefs has proven to be a big headache with unexpected side effects at every turn, so I'm reluctant to actually submit a PR - I don't even have a proposed fix.

Do you still have an unanswered question? Please log in first to post your question.