Drag selection method no longer works for selecting all similar elements in range selection

• Dec 2, 2019 - 15:48
Reported version
3.3
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
PR created
Regression
Yes
Workaround
Yes
Project

Version 3.3.3 /Windows10

1) Load this test file: fingering_0.mscz
2) Press and hold Shift, then drag the cursor across let's say second system with fingerings, entirely or partially (or third system, with lyrics)

draw.jpg

3) Right-click fingering (or lyric) to select all the similar elements in this range selection

  • Expected result: these fingerings are selected
  • Current result: right-click unselects the range selection

    similar 2.jpg


Comments

As far back as I go (since the very beginning of version 3 in December 2018, and even before that, September, for example), I never see it work.

Workaround No Yes

But with a 'regular' range selection (click first element, shift+click last) it works, so there is a workaround
It does work in 2.3.2, so indeed a regression

Weird, it works fine for me on Linux, using two-finger tap on a touchpad as the right-click gesture. Right-click keeps the selection no matter how I make the selection itself. Maybe it has to do with exactly where you start and end the drag, strange as that might seem? Can someone post a GIF so I can see the exact drag?

I found a successful drag while creating the GIFs so I included a success and a failure.

Failure:

Drag selection failure.gif

Success:

Drag selection sucess.gif

The speed menu is cut off, but you can see the success and failure by what does or doesn't get selected.

I still cannot reproduce on Linux, but can on Windows. As far as I can tell, it has to do with the "clickOffElement" variable not being initialized correctly, so MuseScore is thinking we have clicked an empty space and thus should clear the selection. Not really sure when/how this is supposed to be set, but probably the drag select set it to true (since you do start that by clicking an empty space) and somehow it never gets set to false when it should be.

I see there is an outstanding PR (https://github.com/musescore/MuseScore/pull/5494) that changes handling of this variable, it's possible that PR fixes this issue, but if not, any fix should probably be built on top of this.