Is it possible to controle what's selected with `curScore.selection.selectRange` ?
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
Nope. It could be that the API function honors the selection filter even; not sure how it was coded internally
In reply to Nope. It could be that the… by jeetee
Too bad. Thanks for the answer.
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 Internally, the filtering is… by Marc Sabatella
I manage to do select what I wanted to select, to cut it (
cmd("cut")
), but pasting doesn't work.I reproduced it with manually (so this isn't linked to the API). But this will be probably the subject of another question on the forum.
In reply to I manage to do select what I… by parkingb
Past doesn't work here because you don't have a range selection and MuseScore can't handle this currently.
There has been some discussion around allowing this for MS4, but I can't recall whether it was implemented already or not.
In reply to I manage to do select what I… 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.