Not able to add Stafftext with shortcut when empty measure is selected.

• Oct 18, 2019 - 13:27

I think ive found a little bug. When selecting a empty measure the user can add stafftext by double clicking on stafftext(this is working correctly) or pressing ctrl+t. When using the shortcut I get a dialog which tells me: ''No note or rest selected: Please select a note or rest and retry'' but when a measure is selected there is a rest selected so that seems not to work right.

Philip Bergwerf

Attachment Size
Dialog.png 657.49 KB

Comments

Not a bug, you need to select the rest, a range selection may contain that rest, but that is not the same thing, it may contain many other things too. Same 'problem' whan you select a measure that has a (couple) note(s) in it

Probably the message could be clarified to say, "Please select a single note or rest", but even so, a range selection might look like only a single note or reset is selected but internally, it's different. Still, the Inspector is able to realize that rests are the only elements in the selection, probably commands that only work on a single note or rest could be improved to also detect this. Would be nice especially for things like rehearsal marks that really do logically seem connected to the measure rather than any particular note or rest.

In reply to by Marc Sabatella

Ok, not a bug. But why does selecting the range and double clicking stafftext in the palette(which is the same action) not show the 'No note or rest selected' dialog? I don't understand the difference between using shortcut and choosing the same action from the palette.

Ah I see when selecting a measure with multiple elements in it and double click the staff text in the palette, ms places stafftext for every element. So maybe that should have the 'No note or rest selected' dialog too.

In reply to by Philip Bergwerf

The shortcut creates an empty text box that must either be filled with text or it will cease to exist (press escape after the shortcut to see this). The palette enters "staff text" attached to each note or rest in the selected range. You probably don't want staff text that says "staff text" but you can edit this when you want.

In reply to by Philip Bergwerf

I didn't design it, but there are differences between most shortcuts and their text palette entries. For example, ctrl+m enter an empty rehearsal mark (like the staff text shortcut) and the palette always puts something in the rehearsal mark, either something based upon the last entered rehearsal mark or the letter A.

In reply to by Philip Bergwerf

Well, sometimes it is useful to be able to add an element to everything in a selection all at once - articulations, dynamics (for a "vertical" selection, anyhow), etc. So the palette needs to have that important functionality. But you can't have both - if the palette is going to add text to multiple notes at ocne, it can't very well also have you type each one of them. Although, there is a command for that - Alt+Right after tpying text moves on to the next note, just as Space does for lyrics or chord symbols.

In reply to by Philip Bergwerf

The palette code is pretty general as it needs to work for all element types you can add from the palette, and many of them can be applied to range selections. The code for the shortcut command is very specific to text. So the answer is, this is handled in two different places, and one of them does the check, the other does not.

That said, no particular reason a check couldn't be added to the palette code as well. But, maybe better is to implement a suggestion I recall someone making, where the effect off adding text to a range selection is to add it to the first note/rest of the range, on each staff. Again, we'd probably need to make sure we implemented it for both palette and shortcut. But that's probably the right answer.

EDIT: except, mike320 is absolutely right about the difference between adding via palette vs a command, so maybe it doesn't make so much sense for the shortcut command to do what I just suggested across multiple staves.

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