Skip to content

Commit c117bd3

Browse files
wizofausJojo-Schmitz
authored andcommitted
Fix #284064: "Respell pitches" should only work on the selection, if there is any
partial backport of musescore#8775
1 parent 8c27b48 commit c117bd3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

libmscore/score.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -770,9 +770,8 @@ void Score::spell()
770770
for (int track = strack; track < etrack; ++track) {
771771
Element* e = s->element(track);
772772
if (e && e->type() == ElementType::CHORD)
773-
notes.insert(notes.end(),
774-
toChord(e)->notes().begin(),
775-
toChord(e)->notes().end());
773+
std::copy_if(toChord(e)->notes().begin(), toChord(e)->notes().end(),
774+
std::back_inserter(notes), [this](Element* ce) { return selection().isNone() || ce->selected(); });
776775
}
777776
}
778777
spellNotelist(notes);

0 commit comments

Comments
 (0)