From 0017ee8e3b62b15905e118242db20e56ae8613d9 Mon Sep 17 00:00:00 2001 From: James Thistlewood Date: Fri, 24 Aug 2018 09:49:46 +0100 Subject: [PATCH] Fix #275574: crash when dragging element onto score in edit mode --- mscore/palette.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mscore/palette.cpp b/mscore/palette.cpp index 66c18989ce..1938537c83 100644 --- a/mscore/palette.cpp +++ b/mscore/palette.cpp @@ -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) {