From 7b5fe971e73f7c3492cb598bd85942169e7be36b Mon Sep 17 00:00:00 2001 From: lasconic Date: Sat, 31 Aug 2013 17:45:28 +0200 Subject: [PATCH] fix #11661: grace notes are not part of selection --- libmscore/select.cpp | 3 +++ libmscore/transpose.cpp | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libmscore/select.cpp b/libmscore/select.cpp index 927993254cdde..6cca2fcad0746 100644 --- a/libmscore/select.cpp +++ b/libmscore/select.cpp @@ -515,6 +515,9 @@ QList Selection::noteList(int selTrack) const continue; Chord* c = static_cast(e); nl.append(c->notes()); + for (Chord* g : c->graceNotes()) { + nl.append(g->notes()); + } } } } diff --git a/libmscore/transpose.cpp b/libmscore/transpose.cpp index 56bf5553e4fe3..a7875bf183f4b 100644 --- a/libmscore/transpose.cpp +++ b/libmscore/transpose.cpp @@ -355,12 +355,20 @@ void Score::transpose(int mode, TransposeDirection direction, int transposeKey, continue; Chord* chord = static_cast(e); QList nl = chord->notes(); - foreach (Note* n, nl) { + for (Note* n : nl) { if (mode == TRANSPOSE_DIATONICALLY) n->transposeDiatonic(transposeInterval, trKeys, useDoubleSharpsFlats); else transpose(n, interval, useDoubleSharpsFlats); } + for (Chord* g : chord->graceNotes()) { + for (Note* n : g->notes()) { + if (mode == TRANSPOSE_DIATONICALLY) + n->transposeDiatonic(transposeInterval, trKeys, useDoubleSharpsFlats); + else + transpose(n, interval, useDoubleSharpsFlats); + } + } } if (transposeChordNames) { foreach (Element* e, segment->annotations()) {