Notes disconnect from stems when dragged in a range and leads to crash

• Oct 14, 2018 - 04:43
Reported version
3.0
Type
Graphical (UI)
Severity
S2 - Critical
Status
closed
Project

Stems become disconnected from their notes when multiple notes are SHIFT-selected and dragged up or down.

Video demonstration...

https://youtu.be/BMCqm3yg6i8


Comments

Title Notes disconnect from stems when dragged Notes disconnect from stems when dragged in a range
Severity S4 - Minor S3 - Major

Confirmed with current 3.0 dev. (and Windows7): 0580525

Test file : test drag.mscz
Steps:
1) Eg, click first note measure 2 -> Shift + click fourth note, same measure 2
2) Always by holding on Shift key, click on fourth note, and engage the movement for dragging (up or down)
3) Release Shift key
4) Continue to drag

First result: notes disconnect from stems

5) After dragging the selection, release the mouse

Result: crash

  • Note there is no crash by selecting (Shift + click note always) 1 note or 2 notes. And may be fixed with Ctrl + A -> Ctrl + R.
    The crash occurs when dragging a range of 3 notes and more (on this file)

Also Gif animation:

Video.gif

Title Notes disconnect from stems when dragged in a range Notes disconnect from stems when dragged in a range and leads to crash
Severity S3 - Major S2 - Critical

That is interesting. When I try to drag the selected notes while holding Shift key the whole score moves up or down rather than the selected notes.

In reply to by dmitrio95

Indeed, it's a bit tricky to find the good gesture (I failed too in the first attempts!)
You have really to release Shift key quickly, just after clicking the note and beginning (and really beginning) the mouse dragging. The unique solution: re-try and again...!

Status (old) active patch (code needs review)
Status active  

OK, thank you @cadiz1, I have finally reproduced the issue! The solution for me was to click a note, release Shift and only after that start dragging. It is interesting whether it was intended to work so.

Anyway there seem to be two separate problems in this issue: one is those stems disconnecting and the other is a crash when dragging notes (it occurs also when dragging several whole notes without any stems). I am not sure whether we should create two separate issues for them. Still I have some pathes for these issues so I'll post the links here:
https://github.com/musescore/MuseScore/pull/4037
https://github.com/musescore/MuseScore/pull/4038

Fixed in branch master, commit a7bf943452

fix #277116: do not move non-movable elements while dragging them

If user tries to drag non-movable element it will not be dragged
due to the check in ScoreView::mouseMoveEvent. However a non-movable
element can be selected with other movable elements, and user can
drag such a selection. This patch prevents improper moving
non-movable elements in such cases.