Skip to content

Commit

Permalink
Merge pull request #3920 from mattmcclinch/275834-drop-slur
Browse files Browse the repository at this point in the history
fix #275834: crash when add slur to score
  • Loading branch information
anatoly-os committed Sep 5, 2018
2 parents f50c777 + 5af04c4 commit ec64d90
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mscore/dragdrop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -619,7 +619,11 @@ void ScoreView::dropEvent(QDropEvent* event)
delete editData.element;
break;
}
editData.element = 0;
// If the state was changed to ViewState::EDIT,
// (as a result of ScoreView::cmdAddSlur(), for example)
// then do not set editData.element to 0.
if (state != ViewState::EDIT)
editData.element = 0;
setDropTarget(0); // this also resets dropRectangle and dropAnchor
score()->endCmd();
// update input cursor position (must be done after layout)
Expand Down

0 comments on commit ec64d90

Please sign in to comment.