Skip to content

Commit

Permalink
fix #275044: lyrics placement cannot be defined per voice/staff line
Browse files Browse the repository at this point in the history
Add condition to if statement. It allows to change placement of lyrics per voice without affecting to the placement of lyrics per another voice.
  • Loading branch information
handrok committed Sep 12, 2018
1 parent 37384e5 commit ea2f165
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libmscore/lyrics.cpp
Expand Up @@ -583,16 +583,16 @@ void Lyrics::undoChangeProperty(Pid id, const QVariant& v, PropertyFlags ps)
}
if (id == Pid::PLACEMENT) {
if (Placement(v.toInt()) == Placement::ABOVE) {
// change placment of all verse upto this one to ABOVE
// change placment of all verse for the same voice upto this one to ABOVE
score()->forAllLyrics([this,id,v,ps](Lyrics* l) {
if (l->no() <= no())
if (l->no() <= no() && l->voice() == voice())
l->TextBase::undoChangeProperty(id, v, ps);
});
}
else {
// change placment of all verse starting from this one to BELOW
// change placment of all verse for the same voce starting from this one to BELOW
score()->forAllLyrics([this,id,v,ps](Lyrics* l) {
if (l->no() >= no())
if (l->no() >= no() && l->voice() == voice())
l->TextBase::undoChangeProperty(id, v, ps);
});
}
Expand Down

0 comments on commit ea2f165

Please sign in to comment.