Add cresc./dim. shouldn't apply to empty staves

• Jun 6, 2021 - 09:44

If you select a range across multiple staves and add a cresc. or dim. it works more or less as expected, except it also adds them for staves that have no notes in the selected range. I can't think of a time this would be useful (and it certainly does it do it for slurs!).


Comments

It works for slurs because those can be definition only be attached to notes. Other lines can be attached to notes or rests. But indeed, it could be a useful special-case optimization to skip empty staves for hairpins specifically. Arguably for dynamics as well.

In reply to by Marc Sabatella

Is it worth creating as an issue then? Happy to contribute a PR for it.
But would there be any need to override this behaviour? What if all the staves you've selected have no notes? (not a fan of operations that give no feedback at all, the instinctual reaction is to try them again as it seems like it just didn't register your click/keypress. Mind you that's exactly what happens with "add slur" now - even in cases where you might expect it to work, e.g. trying to slur between a note in the LH and the RH in a grand staff using a range selection. There's no feedback explaining why nothing happened or hint as to what you should do instead)

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