"Generate key signatures" in staff type change does not work

• Nov 27, 2019 - 09:23
Reported version
S4 - Minor

Repro steps:

  1. Open the attached score
  2. Select the Staff Type Change icon in measure 3
  3. In the inspector toggle Create key signatures

Expected: The key signature in the first line of the second system should change its visibility accordingly.
Actual: The key signature remains visible.

Generate key signatures.png

Attachment Size
Generate key signatures.mscz 4.95 KB


And "Generate time signatures" seems to get ignored too, but the other way round, it doesn't get shown regardless of that setting.
So only "Generate Clefs" seems to work.

In reply to by Jojo-Schmitz

If a unticked Staff Type Change > Generate time signature is assigned to the first measure or if there is a time signature change behind it then the time signature gets suppressed. So this works. But it does not enforce the time signature. I assume this is by design. Otherwise a three state checkbox would be required: Suppress, Enforce, Default.

Maybe it should be named Suppress clefs/time/key signatures rather then Generate clefs/time/key signatures

"Maybe it should be named Suppress..."
I think Hide (the opposite of Show in staff properties) would be a better idea. Though they are hidden they are still honored. The purpose of these seem to be to allow the same options you have in staff properties. This enables you to have some control of the staff without having to use an instrument change, which now gives you the option of setting any of the properties you can set in staff properties.

I think that "Generate" is the right word choice in the case of clefs and key signatures, because as I understand it, these options are supposed to determine whether or not to generate clefs and key signatures at the beginning of each system. I am confused by "Generate time signatures", because time signatures are not generated at the beginning of each system. Not even the initial time signature is "generated". Unchecking "Generate clefs" should only hide the generated clefs, but currently it hides user-added clefs also, which I think is a mistake. Unchecking "Generate key signatures" does not hide user-added key signatures, but unfortunately it does not hide the generated key signatures either. And "Generate time signatures" remains a mystery to me. If this is unchecked, then all time signatures are hidden.

Of course, it is possible that I am mistaken about the purpose of these options.

Title Staff Type Change, Generate key signatures does not work "Generate key signatures" in staff type change does not work
Status PR created fixed

Fixed in branch master, commit 9c7e98145c

_fix #297738: "generate key signatures" in staff type change does not work

staff()->genKeySig() always checks for Fraction(0, 1) while staff()->staffType(tick())->genKeysig() checks for the property at the exact tick.

The patch also fixes the StaffType generation of tablature staves, making genKeysig default (and always) to false._

Fix version