Skip to content

Commit

Permalink
fix #42891: lyrics run off bottom of page
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Mar 9, 2015
1 parent 689fad5 commit dfaef4d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion libmscore/layout.cpp
Expand Up @@ -3357,7 +3357,7 @@ PAGEDBG(" system %d", i);
bmargin = vbox->bottomGap();
tmargin = vbox->topGap();
if (pC.lastSystem) {
if (pC.lastSystem->isVbox())
if (pC.lastSystem->isVbox())
tmargin += pC.lastSystem->vbox()->bottomGap();
else
tmargin += systemFrameDistance;
Expand Down Expand Up @@ -3475,6 +3475,15 @@ void Score::layoutPage(const PageContext& pC, qreal d)
return;
}

// allow room for lyrics on last staff of last system
// these are not included in system height or in previous margin calculations
// but they are accounted for in prevDist
int lastStaffIdx = nstaves() - 1;
if (!pC.lastSystem->isVbox() && staff(lastStaffIdx)->show() && pC.lastSystem->staff(lastStaffIdx)->show()) {
if (pC.prevDist > pC.slb)
restHeight -= pC.prevDist - pC.slb;
}

const qreal maxStretch = styleP(StyleIdx::maxSystemDistance) - styleP(StyleIdx::minSystemDistance);

QList<System*> slist;
Expand Down

0 comments on commit dfaef4d

Please sign in to comment.