How to get the current position?

• Nov 21, 2012 - 21:31

I'd like to do something to the currently selected note or chord. How do I know the position of the user's cursor? The selected property seemed to be false for every element. Oh, and I'm trying to write this for 2.0.


Comments

In reply to by Marc Sabatella

I tried to modify the behaviour of applyToNotesInSelection so that when nothing is selected it uses the regular cursor that you get. When I select a note or multiple note with ctrl-click this does nothing, only selections by clicking and than shift-clicking seem to work.
The documentation Marc mentioned says that after getting a cursor you should rewind. But that leaves it at the start of the staff, not at the currently selected note.

In reply to by Jojo-Schmitz

I find this very strange. If I select a specific number of notes using command-click on the mac I can change them but it is not seen as a 'real' selection because there is no blue box? This is not how most other software, like a file manager, works.

In case you wonder why I want to do that it is because I want to change some notes enharmonically.

In reply to by Ruud Mulder

The selection mechanism in the plugin framework seems to depend on the selection being contiguous. The only reason I can image why you'd *need* to select thngs in a way that doesn't result in a blue box is to get a discontiguous selection. So the whole idea seems not likely to work.

ApBtw, are you aware that 2.0 already has a command to toggle enharmonic spelling? Cick note, press "J".

In reply to by [DELETED] 5

OK. I will try it.
As I explained to Marc in another thread I come from Logic via Lilypond to MuseScore, so selecting a number of notes, slurs and whatever and copy/pasting them is what I am used to.
I'm not whining, I think MuseScore is a great program (Logic also has its quirks and Lilypond is only for those with an affinity for programming). I'm trying to understand the idea and design behind the program to make it better.

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