Make volta mouse drops apply only to first staff by default, unless user holds control to drop to a specific staff

• Jun 25, 2019 - 01:30
Reported version
3.1
Type
Graphical (UI)
Frequency
Many
Severity
S5 - Suggestion
Reproducibility
Always
Status
closed
Regression
No
Workaround
No
Project

Currently, dragging and dropping a volta onto a measure will cause the volta to be applied to the specific stave under the mouse when mouse released. The most common & practical case when applying voltas is that they are applied to the top staff.

Applying a volta to a staff other than the first staff causes problems because MuseScore only checks for the presence of a volta on the first staff when applying voltas to part scores when generating parts, and also applies voltas dropped on the main score to previously-generated part scores only when they were dropped onto the first staff of the main score. (This is problematic because at this point the staff in the main score would differ from the part score as they wouldn't have the same voltas.)

I suggested in https://musescore.org/en/comment/929227 that "I think should voltas should always drop to first staff unless user holds control." Marc seems to agree in that he certainly wouldn't mind if holding Ctrl were necessary to make dropping to non-first staves.

I've discussed with marc that I think voltas should be applied to the first staffand he agrees that at least: https://musescore.org/en/comment/929227

Note I'm only doing this change to Mouse drops. I haven't decided whether to make this behavior change to be applied for double-clicking palette elements to a selection too.


Comments

So one issue so far with my PR: it cannot drop onto elements inside the measure (such as a rest or note), but only accepts drops onto stave area outside of any elements. And nor can I drop onto area between staves. So I might close this PR and submit a better one...

After much thought of trying a different method to solve the issue mentioned in my above comment, I have decided that my PR is in fact better and simpler. So please give it a review.

Severity S5 - Suggestion S4 - Minor

I am bumping the priority one notch, because I've determined the glitchy behavior I describe in https://musescore.org/en/node/291265 occurs in both 3.1.0 and 3.2.0 releases, and that that glitchy behavior should be described as a "bug" because MuseScore drops the voltas to an incorrect position different than where the anchor indicates it will be dropped. Therefore my PR is no longer just a "feature" but rather is also indeed a "bug fix".

Fix version
3.3.0