Make volta mouse drops apply only to first staff by default, unless user holds control to drop to a specific staff
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
I have created a PR for dropping voltas with mouse, please review: https://github.com/musescore/MuseScore/pull/5164
I'm considering that we should also do this when double-clicking on a palette element...I'll go ahead and implement it.
I'm noting that this PR also indireclty fixes the problem I just investigated in https://musescore.org/en/node/291265 as I don't make it possible to drag and drop to the multi-measure rest element, but rather can just drop to the underlying measurebase that is holding the multi-measure rest element.
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.
I've closed my earlier PR, in favor of a new one I just opened: https://github.com/musescore/MuseScore/pull/5167
My new one uses the drop anchor which I find is more visually informative than graying out the measure, and which also is able to drop from areas between staves and areas taken up by elements in a staff.
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".
I've spun off the actual bug of dropping to the next measure into a separate issue: #291431: Incorrect drop anchor displayed while dragging a Volta
I'm lowering this issue's severity because now it's just a feature request, not a bug fix.
The original PR has been closed. There is a new PR at https://github.com/musescore/MuseScore/pull/5182.
Fixed in branch master, commit 20eb2f1e0e
fix #291261: Make volta mouse drops apply only to first staff by default
fix #291431: Incorrect drop anchor displayed while dragging a Volta
Fixed in branch master, commit f38f58ee88
_Merge pull request #5182 from mattmcclinch/291261-drag-volta
fix #291261: Make volta mouse drops apply only to first staff by default_
Automatically closed -- issue fixed for 2 weeks with no activity.