Arrow key / transpose (and others) commands don't obey selection filter

• Apr 23, 2015 - 23:46
Type
Functional
Severity
S4 - Minor
Status
closed
Project

Ubuntu 14.04, GIT commit: 3227c6e

1) enter ntoes into voice 1 & 2
2) select
3) uncheck voice 2 in selection filter
4) press "up"

Result: both voices transpose. Same if you reverse steps 2 & 3, btw.


Comments

I find I can mostly fix this by adding a check for canSelectVoice(track) here:

https://github.com/musescore/MuseScore/blob/7d70645725c9392309ee8d9684a…

This same code is used a few other places, and as far as I can tell, they all have the same issue, and the same fix applies. So that much should be good.

But then I notice something else. With or without that change, the act of pressing Up or Down converts the range selection into a list selection. I guess that's OK. But then, if I change the selection filter voice settings, my selection doesn't change. That is:

1) enter notes into two voices for a measure
2) select the measure
3) press up - this transposes and converts selection to list
4) deselect Voice 2 in selection filter

Result - the notes in voice 2 are still selected

Seems this probably isn't correct? I see I can also select notes in voice 2 individually even though voice 2 is disabled in the selection filter. Or were those controls *meant* to only affect range selections?

Title Arrow key / transpose commands don't obey selection filter Arrow key / transpose (and others) commands don't obey selection filter
Status (old) active patch (code needs review)

On the assumption that the selection filter really is supposed to affect range selections only, so the behavior described in #1 above is not a problem in itself, here is a PR to fix the voice filter for up/down and other commands that use Selection::noteList():

https://github.com/musescore/MuseScore/pull/1970

Other operations that have the same issue and are fixed by this include adding accidentals directly (eg, using the toolbar), adding ties, adding intervals with Alt+number, adding slurs, and changing enharmonic spelling ("J").