Merge pull request #3899 from jthistle/275574-dragging-dynamic-in-edit-mode-crash
Fix #275574: crash when dragging element onto score in (text) edit mode
This commit is contained in:
commit
c094283cd8
1 changed files with 5 additions and 0 deletions
|
@ -322,6 +322,11 @@ void Palette::mousePressEvent(QMouseEvent* ev)
|
|||
dragStartPosition = ev->pos();
|
||||
dragIdx = idx(dragStartPosition);
|
||||
|
||||
// Take out of edit mode to prevent crashes when adding
|
||||
// elements from palette
|
||||
ScoreView* cv = mscore->currentScoreView();
|
||||
cv->changeState(ViewState::NORMAL);
|
||||
|
||||
if (dragIdx == -1)
|
||||
return;
|
||||
if (_selectable) {
|
||||
|
|
Loading…
Reference in a new issue