Skip to content

Commit

Permalink
fix #54221: bd layout with measure after horizontal frame
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcSabatella committed Jun 14, 2015
1 parent de3a7c2 commit 4aa4c83
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2787,16 +2787,29 @@ QList<System*> Score::layoutSystemRow(qreal rowWidth, bool isFirstSystem, bool u

qreal ww = rowWidth;
qreal minWidth;
bool firstInRow = true;
for (bool a = true; a;) {
a = layoutSystem(minWidth, ww, isFirstSystem, useLongName);
sl.append(_systems[curSystem]);
++curSystem;
ww -= minWidth;
if ((0.0 < minWidth && minWidth <= ww) || firstInRow) {
// system fits on this row, or we need to take it anyhow
sl.append(_systems[curSystem]);
++curSystem;
ww -= minWidth;
}
else {
// system does not fit on this row, and we don't need it to
// reset to add to next row
if (curMeasure)
curMeasure = curMeasure->prev();
else
curMeasure = lastMeasure();
}
firstInRow = false;
}
//
// dont stretch last system row, if minWidth is <= lastSystemFillLimit
// dont stretch last system row, if accumulated minWidth is <= lastSystemFillLimit
//
if (curMeasure == 0 && ((minWidth / rowWidth) <= styleD(StyleIdx::lastSystemFillLimit)))
if (curMeasure == 0 && (((rowWidth - ww) / rowWidth) <= styleD(StyleIdx::lastSystemFillLimit)))
raggedRight = true;

//-------------------------------------------------------
Expand Down

0 comments on commit 4aa4c83

Please sign in to comment.