Global properties about current selection: a proposal
The attached patch changes plugins.cpp, adding 2 global properties:
curSelectionStart: returns a cursor at the first ChordRest of the selection
curSelectionEnd: returns a cursor at the last ChordRest of the selection.
If the selection is a single note or rest ('blue note' rather than 'blue rectangle') or if note insert mode is active, the 2 cursors point to the same element. If there is no selection, the cursors are undefined
.
The code passed a few tests here, but a check from someone more familiar with MuseScore source is definitely necessary (2 or 3 dubious points are marked in the source).
Any comment is welcome!
M.
P.S.: I hope I went the right way, this time!
Attachment | Size |
---|---|
plugins_cpp.patch | 2.82 KB |
Comments
See //musescore.org/node/2551#comment-13155
In reply to Cross reference by David Bolton
Good! I'll check it ASAP!
Thanks,
M.