uncheck courtesy for time- or Key sigs in inspector has no effect when having the courtesy time- or keysig selected

• Jan 29, 2014 - 08:51
S4 - Minor

On s score that has courtesy key- or time sigs, select that courtesy key- or timesig (the one at the end of the line) and then in inspector uncheck it.

desired effect: the courtesy key- or time sig disappears, or that button doesn't show
actualy effect: nothing happens, except that the button is unchecked.

Apparently you have to select the 'real' key- or time sig (the one at the beginning of the next line) for that button in inspector to work

the 'show naturals' for key sigs does work as expected, although only for that courtesy key sig, not for the 'real' one. Not sure whether it should or not.

Windows 7 Enterprise, 64bit, nightly build dfabf91, and also a self build ea1e881


Title uncheck courtesy for time- or Key sigs in nspector has no effect when having the courtesy time- or keysig selected uncheck courtesy for time- or Key sigs in inspector has no effect when having the courtesy time- or keysig selected

I'm pretty sure this is exactly as it is supposed to be. Certainly it's how it works in 1.3 via right click menu, and I guess that sets my expectations. If you simply want to make a courtesy signature invisible, you set the visibility property of the courtesy signature directly. But if you want to make it go away completely, that's a property of the main signature. I suspect that directly models how it is implemented. That is, it's the main signature that controls whether the courtesy one is generated; the courtesy signature doesn't generate or ungenerate itself.

On the other hand, that doesn't mean it wouldn't make a nice enhancement to hook the Show courtesy box up to the courtesy signature anyhow. Seems to work that way for clefs. Actually, I'd also propose that selecting a courtesy signature and pressing "Delete" should have the same effect.

See also #7890: Hide courtesy clef does not work in context menu

1.3 doesn't have an inspector, so can't try to tell your via that button that it supposed to be possible to set this?

It work for courtesy clef and for key sigs 'show naturals works', but not for courtesy time- and keysig, this is highly inconsistent, isn't it?
Also the button is shown on the real time sig, but only when selecting the one from the top staff it works and only there it is also shown on the right-click menu
So that right-click menu know exactly what works, but the inspector does not.
I see that in mscoer/propertymenue.cpp there are checks whether an element is generated (->courtesy) or not and, in case of time sig, whether it is the top staff

{syntaxhighlighter brush:cpp}
else if (e->type() == Element::TIMESIG) {
genPropertyMenu1(e, popup);
TimeSig* ts = static_cast(e);
int _track = ts->track();
// if the time sig. is not generated (= not courtesy) and is in track 0
// add the specific menu item
QAction* a;
if (!ts->generated() && !_track && ts->measure() != score()->firstMeasure()) {
a = popup->addAction(ts->showCourtesySig()
? QT_TRANSLATE_NOOP("TimeSig", "Hide Courtesy Time Signature")
: QT_TRANSLATE_NOOP("TimeSig", "Show Courtesy Time Signature") );
popup->addAction(tr("Time Signature Properties..."))->setData("ts-props");
else if (e->type() == Element::CLEF) {
genPropertyMenu1(e, popup);
Clef* clef = static_cast(e);
// if the clef is not generated (= not courtesy) add the specific menu item
if (!e->generated() && clef->measure() != score()->firstMeasure()) {
QAction* a = popup->addAction(static_cast(e)->showCourtesy()
? QT_TRANSLATE_NOOP("Clef", "Hide courtesy clef")
: QT_TRANSLATE_NOOP("Clef", "Show courtesy clef") );
else if (e->type() == Element::KEYSIG) {
genPropertyMenu1(e, popup);
KeySig* ks = static_cast(e);
if (!e->generated() && ks->measure() != score()->firstMeasure()) {
QAction* a = popup->addAction(ks->showCourtesy()
? QT_TRANSLATE_NOOP("KeySig", "Hide Courtesy Key Signature")
: QT_TRANSLATE_NOOP("KeySig", "Show Courtesy Key Signature") );
a = popup->addAction(ks->showNaturals()
? QT_TRANSLATE_NOOP("KeySig", "Hide naturals")
: QT_TRANSLATE_NOOP("KeySig", "Show naturals") );

Yes, it is inconsistent that it works for clefs but not the others. I did observe that it would make a nice enhancement to make it work similarly for time & key signatures. As for "show naturals", I guess I ideally I'd want that to be independently controllable for the main keysig and the courtesy one. Without looking at references to support this, my off-the-cuff feeling is that I might want to show the naturals on the courtesy keysig but not on the real one.

In the issue I linked, the observation was made that the "generated" property appears to be be set incorrectly, and that this appears to be part of the related problem described there.