Cursor navigation issue/bug

• Jun 9, 2015 - 14:50

Please download and open the attached MuseScore file, cursor_movement_issue.mscz. And follow these instructions in the exact order:

Make sure you are in edit mode to begin with. Click on the first chord in bar 8, (treble staff, voice 1).

Now go into note entry mode ("n"). You should now be in voice 1. Use [right arrow] to move the cursor one note at a time forward. Do this a few times and then use the left arrow, one step at a time, to return to the note you started from. Then use the left arrow to go backwards a few notes, then the right arrow to go forward to the original note.

The behaviour, so far, is as expected.

Now, at the original chord, select voice 2. Press the right arrow to go forward and the voice changes unexpectedly back to voice 1! Use the left arrow to return to the chord you started from (still in voice 1).

Now, switch to voice 2 again. But this time use the left arrow to go backwards, one chord at a time. The cursor moves as expected and remains in voice 2. Go backwards a few notes and then reverse direction, using the right arrow key to return to the chord you started at.

Continue with the right arrow key to move past the "original start point" in a forward direction: The cursor, NOW, behaves as expected and no longer switches back to voice 1 when you move forward!!

Remain in voice 2. Return using the left arrow button to the "original start point". Now switch to voice 1. Move forward using the right arrow key. Immediately the program switches back to voice 2!!

Return to the "original start point" using the left arrow and switch to voice 1. This time use the arrow keys to move backwards, then forwards. This time the program will remain in voice 1, as expected, even if you move ahead of the "original start point"!!

A bug, surely?

Attachment Size
cursor_movement_issue.mscz 22.16 KB

Comments

I'm a bit confused by the first step - be sure to be in Edit mode. Edit mode is why you are in after double clicking an element. Did you perhaps mean, "normal" mode (no mode information displaying in lower right in status bar)?

Then I was also unsure what you meant by "Now, at the original chord, select voice 2". Do you mean, while still in note input mode, press the voice 2 button? This doesn't "select" voice 2 or any note in that voice, it simply changes the note input system to be ready to accept input into voice 2. It doesn't change what is selected. If there was a note in voice 1 selected at the moment you pressed the voice 2 button, it remains selected. And that is why note input returns to voice 1 when you move the cursor - the cursor is moving the *selection*, and the selection is in voice 1. Indeed, there might not even be a note in voice 2 yet at the moment you press the voice 2 button, although of course in this case there happens to be. And I think people will *expect* the prevous note to remain selected - so they can still use the keybaord shortcuts like up/down.

Normally during navigation, the note input cursor and selection are in sync. They are out of sync in two specific instances, one far more common than the other. You are seeing the less common situation: right after changing the inut voice selector. But also, right after entering a note, the selection remains, as it must, on the note just entered, while the input cursor advances, as it must, to the next input position. In this situation - note input cursor is ahead of the selection - pressing the *right* arrow move the selection forward to meet the note input cursor. But pressing the *left* arrow moves the note input cursor backwards to meet the selection. This was an improvement made relatively recently in response to user request. And that is why you are seeing a difference in your case as well.

Anyhow, if you want to navigate voice 2, the best thing to do is move the cursor there - don't depend on changing the input voice selector to do that for you. EIther click a note in that voice to begin with, or if switching to voice 2 after entering note input mode, you can enter a note which will select it and put the selection in voice 2, or you can use the shortcuts Alt+Up/Down to move through the notes vertically.

I used the wrong term. What I meant, I think, was probably normal mode – in which you can click on a note to select it.

There is still a puzzle here. Going back to the example score, starting in note mode, voice 1. If you select voice 2 and attempt to move the cursor forward it switches back to voice 1. BUT if you move the cursor backwards then forwards, you remain in voice 2, or at least the cursor remains green.

This is a source of confusion to me.

In reply to by geetar

See my reply above again. As I explained, the algorithm for navigation left versus right *does* differ, for the reason I stated: to allow the selection to move forward to meet the note input cursor when moving *right* just after entry of a note, but to allow the note input cursor to move backward to mee the selection when moving *left* just after note entry. So moving to the right uses the selection as the basis, moving left uses the note input cursor. That allows navigation right after note entry to work as expected, while also working as expected in the general case of just cursoring around - after any cursor command, the selection and the note input cursor will be in sync anyhow. That is why after you initially move left, moving right stays in voice 2 - after the initial move left, the selection and note input cursor are now in sync and will remain in sync no matter which way you move.

Cursor navigation is a highly complex topic, with each decision designed to optimize one use case having often unexpected ramifications on another.

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