Is it possible to controle what's selected with `curScore.selection.selectRange` ?

• May 9, 2022 - 18:57

Hi,
In the GUI it is possible to filter what will be selected when one does a range selection.
Is it possible to do the same with the API ?
Something like the .filter for the cursor.
Thanks,


Comments

Internally, the filtering is actually done differently for different commands, so plugins would normally be expected to work the same way. In other words, to check the "selected" status of each element as you process is, and/or check the filtered status. Assuming those properties/methods are exposed.

In reply to by parkingb

In this particular case - the list selection happened to be two consecutive notes on the same staff - it might seem plausible to want to paste. But in the general case, a list selection might contain non-consecutive notes from totally different staves, plus random other elements like an articulation attached to a note not selected, a hairpin, a tempo marking, the title, etc. Pasting such selections would be nonsensical.

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