From d6a27f86a38fa5218479fa32982e997dfdc81518 Mon Sep 17 00:00:00 2001 From: Git-Lior Date: Sat, 23 Nov 2019 17:30:22 +0200 Subject: [PATCH] fix #297514: Cannot copy and paste stickings when handling paste, a switch statement is used on dropElement.type() (result is of type ElementType). Before this commit, there was no case for ElementType::STICKING, and paste wouldn't work (default behavior). --- libmscore/chordrest.cpp | 1 + libmscore/note.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/libmscore/chordrest.cpp b/libmscore/chordrest.cpp index 98a9d74c8b70..24745a7ac2a5 100644 --- a/libmscore/chordrest.cpp +++ b/libmscore/chordrest.cpp @@ -535,6 +535,7 @@ Element* ChordRest::drop(EditData& data) case ElementType::TEXT: case ElementType::STAFF_TEXT: case ElementType::SYSTEM_TEXT: + case ElementType::STICKING: case ElementType::STAFF_STATE: case ElementType::INSTRUMENT_CHANGE: if (e->isInstrumentChange() && part()->instruments()->find(tick().ticks()) != part()->instruments()->end()) { diff --git a/libmscore/note.cpp b/libmscore/note.cpp index 298f7b92a690..b573448cd33c 100644 --- a/libmscore/note.cpp +++ b/libmscore/note.cpp @@ -1629,6 +1629,7 @@ bool Note::acceptDrop(EditData& data) const || (type == ElementType::HAIRPIN) || (type == ElementType::STAFF_TEXT) || (type == ElementType::SYSTEM_TEXT) + || (type == ElementType::STICKING) || (type == ElementType::TEMPO_TEXT) || (type == ElementType::BEND) || (type == ElementType::TREMOLOBAR)