look for lyric line end in the same track than the lyric

This commit is contained in:
lasconic 2015-03-15 16:06:59 +01:00
parent 8e7ff3d996
commit d0af9f676a

View file

@ -652,7 +652,7 @@ void LyricsLine::layout()
// find segment with tick >= endTick
Segment* s = lyricsSegment;
while (s && s->tick() < lyricsEndTick)
s = s->nextCR();
s = s->nextCR(lyricsTrack);
if (!s) {
// user probably deleted measures at end of score, leaving this melisma too long
// set s to last segment and reset lyricsEndTick to trigger FIXUP code below
@ -663,7 +663,7 @@ void LyricsLine::layout()
// everything is OK if we have reached a chord at right tick on right track
if (s->tick() == lyricsEndTick && se && se->type() == Element::Type::CHORD) {
// advance to next CR, or last segment if no next CR
s = s->nextCR();
s = s->nextCR(lyricsTrack);
if (!s)
s = score()->lastSegment();
}