Hide courtesy clef does not work in context menu

• Nov 9, 2010 - 15:16
Type
Functional
Severity
3
Status
active
Project

Setup: Rev. 3692 under Windows XP w/ SP3, Qt SDK 2010.04 (Qt Creator 2.0.0, Qt lib 4.7.0).

Steps:
1) Open or create a score
2) Drop a clef change at the beginning of a system other then the first, so that a courtesy clef is generated at the end of the previous system.
3) Right-click on the new clef and choose "Object inspector": check the "Generated" field
4) Right-click on the courtesy clef and choose "Object Inspector": check the "Generated" field

Results:
1) The new clef is marked as generated.
2) The courtesy clef is marked as non-generated.

This breaks the "Hide courtesy clef" mechanism in the contextual menu of a user-added clef.

Expected results:
The opposite of the above!

M.

P.S.: In Staff::changeClef(int tick, ClefType st) function (file staff.cpp, line 340) the new clef is correctly created as non-generated and I could not locate the point when it gets changed.


Comments

Severity

This appears to still be true. Well, the Object Inspector is gone and replaced by Debugger, but the Generated properties are as described above, and most importantly, "Hide courtesy clef" (in right click menu or Inspector) does not work.

Thanks for testing it again.

I believe the main reason for 'Hide courtesy clef' not working is that, when clef changes at measure boundary, the new clef is added in the 'visual' place rather than in the 'logical' place.

I mean: the clef is added before the bar line (where it should be visualized) rather than after (where it belongs logically in case of a line break, the small clef before the line being, in this case, a courtesy clef). Currently, the clef after the line break is generated automatically and is not affected by any user action.

M.

Title Hide courtesy clef does not work Hide courtesy clef does not work in context menu
Severity

BTW, the "Show courtesy" option in the Inspector seems to work fine.

Hide courtesy clef is no longer available in context menu for such clefs. Debugger still shows Generated to be the opposite of what I expect. But Inspector continues to work.

I tried to fix the issue a lot of time ago and, apparently, as the Inspector works, it works.

In my fix, I chose to adopt by design the 'swap' between generated and non-generated (rather than changing a lot of other code):
*) the clef before the bar line is the clef manually added
*) the clef at the beginning of the measure (which is present only at staff begin) is generated by the programme when needed.

If you select the 'wrong' clef (the generated one), I added code somewhere in the Inspector to look for the 'real' clef instead. So, no matter which of the two, is selected the correct one is fetched by the Inspector (and acted upon by the user).

I think the issue can be closed. I cannot be 100% sure there is no overlooked detail but, in case, a new, specific, issue can be open (for instance, occasionally a courtesy clef is added 'across' a section break, even if I added code to avoid this specific case; details are till unclear).

M.

Severity

Well, if the intent is for "Hide Courtesy Clef" to be available in the context menu for the main clef but not for the courtesy clef itself, then it's currently backwards. It doesn't show for the main clef, but does for the courtesy. But it actually works just fine. So at most, it's now a "minor" issue, maybe worth keeping around to be revisited later. Feel free to close if you think it's good enough, though.