Shift / Control and dragging an element does not work (drags the score instead)
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.0.0, revision: 747f3e9
Open the attached file. Press [Shift] or [Control] while dragging any element.
Expected result: As in 2.x, confines drag to the vertical or horizontal.
Actual result: The element does not move, but the whole score is dragged
Attachment | Size |
---|---|
shift_control.mscz | 11.17 KB |
Fix version
3.0.1
Comments
Works as expected for me. You need to press Ctrl/Shift after you start dragging (and change the position a bit). The issue is here, indeed. We need to stop process Ctrl/Shift as panning when mouse button down event was received.
Not a regression. There was no panning in 2.3.
Good to know the workaround exists. But for the record, in 2.3.2 you can press Shift or Ctrl first on an element and dragging still works fine, and Shift+drag also worked fine to pan the score. So this is a regression. I do recall a previous release having an issue with misinterpreting one or the other unless you pressed it afterwards. I think it was Ctrl, and the issue was that Ctrl+click would activate "add element to list selection" had a chance to start dragging. Somehow it seems that must have gotten fixed before 2.3.2, but now broken again for both Shift & Ctrl.
Anyhow, the relevant code is ScoreView::mouseMoveEvent in events.cpp, which I happened to be looking at for other reasons today, which is how this came up again.
The problem with pressing shift/ctrl only after the item has started moving is that it is possible for the move motion prior to the keypress to happen along the undesired axis. I usually use the constrain dragging feature when I don't want an element to move even a single pixel either horizontally or vertically.
Agreed. I see no good reason not to fix this. Looking at the relevant code, it seems there were changes made do to general refactoring, making it hard to track things more specifically, but it seems more an oversight than anything intentional here. Right now this is on a very short of feature regressions, would be nice to eliminate as many of these as possible.
https://github.com/musescore/MuseScore/pull/4505
Fixed in branch master, commit c7b36f97ee
fix #278939: reinstate shift/ctrl for drag
Fixed in branch master, commit 3f165efe6b
Merge pull request #4505 from MarcSabatella/278939-drag
fix #278939: reinstate shift/ctrl for drag
Automatically closed -- issue fixed for 2 weeks with no activity.