Global properties about current selection: a proposal

• Mar 5, 2010 - 17:39

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

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