From 305a7b127c9c4da05d5f920f597c1d8cb7419b13 Mon Sep 17 00:00:00 2001 From: Marc Sabatella Date: Sun, 23 Nov 2014 09:30:23 -0700 Subject: [PATCH] fix #39751: selection / deletion of chord symbols --- libmscore/edit.cpp | 3 +++ libmscore/select.cpp | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/libmscore/edit.cpp b/libmscore/edit.cpp index cdb414305904..73d2212b2e69 100644 --- a/libmscore/edit.cpp +++ b/libmscore/edit.cpp @@ -1791,6 +1791,9 @@ void Score::cmdDeleteSelection() continue; } foreach (Element* annotation, s->annotations()) { + // skip if not included in selection (eg, filter) + if (!selectionFilter().canSelect(annotation)) + continue; if (!annotation->systemFlag() && annotation->track() == track) undoRemoveElement(annotation); } diff --git a/libmscore/select.cpp b/libmscore/select.cpp index 8bf72e127868..e5d5651b0391 100644 --- a/libmscore/select.cpp +++ b/libmscore/select.cpp @@ -458,6 +458,13 @@ qDebug("updateSelectedElements"); for (Segment* s = _startSegment; s && (s != _endSegment); s = s->next1MM()) { if (s->segmentType() == Segment::Type::EndBarLine) // do not select end bar line continue; + foreach(Element* e, s->annotations()) { + if (e->track() != st) + continue; + if (e->systemFlag()) //exclude system text + continue; + appendFiltered(e); + } Element* e = s->element(st); if (!e) continue; @@ -483,13 +490,6 @@ qDebug("updateSelectedElements"); else { appendFiltered(e); } - foreach(Element* e, s->annotations()) { - if (e->track() < startTrack || e->track() >= endTrack) - continue; - if (e->systemFlag()) //exclude system text - continue; - appendFiltered(e); - } } } int stick = startSegment()->tick();