Courtesy Clefs should not display if section break occurs on non-measure measure frame
In the attached score:
notice that the courtesy clef is displayed at final measure of a section that ends with a non-measure (e.g. v_frame or h_frame), but I don't think the courtesy clef should be displayed.
I believe the issue occurs because I suspect the code to determine if a courtesty clef should be displayed at end of section is only looking if the current measure has a section break on it, but is not looking to see if subsequent MeasureBase objects in the score's measure list have a section break. So I think I know how to fix. In fact I've coded such a function I could use here, which examines subsequent MeasureBase objects to determine if a measure is really is final actual measure of a section.
Tested on musescore 2.0.2 and latest b376184
Attachment | Size |
---|---|
courtesy-clef-for-section-break-on-non-measure-frame.mscz | 8.08 KB |
Comments
Wait, never mind. I didn't understand that the frame had a section break. It looked at first like you were saying the frame itself should disable courtesy clefs. Sorry for the confusion.
Here's what I originallly wrote:
I disagree. Maybe there exist situations where you don't want it, but there surely also exist ones where you do. The courtesy clef should remain there by default but if a user wishes to hide it, he can.
In reply to Wait, never mind. I didn't by Marc Sabatella
the section breaks are on the frames.
I do consider this a bug. I believe the fix is in Clef::layout https://github.com/musescore/MuseScore/blob/master/libmscore/clef.cpp#L… where I need to replace the meas->sectionBreak() with my own function that checks subsequent measure base objects for section breaks.