Mismatch between context menu and actual action?
When I select an item (e.g. a stem of a note), move the cursor to another item and open the context menu I see a number of actions defined for the item under the mouse. However, if I choose such an action, the action is executed for selected item, not the item under the mouse what I expect.
To demonstrate this
1) Create a score with two quarter notes.
2) Select the stem of one of these notes.
3) Next move the cursor to the stem of the other note.
4) Open the context menu and select Flip Direction
.
Now you see the selected stem is flipped, not the stem under the cursor. This quite counter intuitive. In a lot of cases nothing happens because the selected operation is not defined for the operation (e.q. select some notes but use the context menu on a key signature). This can cause some unexpected errors in your score because you use the context menu to change something, not realizing there is still an selection active somewhere which receives the action.
My question is: Is this a feature or a bug?
Comments
I do remember this subject coming up before. See #290967: Crash on right-click / Edit Element with a different element selected. I take it from the discussion there that we considered the matter closed when the PR was merged, but I think this left things in the state you are seeing. Seems maybe there was some Telegram chat at the time where we agreed this was OK for some reason, but maybe I'm making that up in my head :-)
Definitely a bug. All other apps move the selection to what you right-click on, before popping up the context menu.
See discussion at Issue #300381: Right-click on an object does not highlight the object before showing the context menu, which I believe is relevant. The Forum post Marc referenced points to it, so this will remove a click to get to it, and give a "what links here" to this post.