Skip to content

Commit

Permalink
Fix GH#13624: allow BeamMode::BEGIN32 and BEGIN64 to continue cross-m…
Browse files Browse the repository at this point in the history
…easure beam

Backport of musescore#15001

Also fixing a compiler warning and some formatting
  • Loading branch information
asattely authored and Jojo-Schmitz committed Mar 5, 2023
1 parent 1c4baff commit 6a55590
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions libmscore/layout.cpp
Expand Up @@ -2687,7 +2687,7 @@ void Score::createBeams(LayoutContext& lc, Measure* measure)
firstCR = false;
// Handle cross-measure beams
Beam::Mode mode = cr->beamMode();
if (mode == Beam::Mode::MID || mode == Beam::Mode::END) {
if (mode == Beam::Mode::MID || mode == Beam::Mode::END || mode == Beam::Mode::BEGIN32 || mode == Beam::Mode::BEGIN64) {
ChordRest* prevCR = findCR(measure->tick() - Fraction::fromTicks(1), track);
if (prevCR) {
const Measure* pm = prevCR->measure();
Expand Down Expand Up @@ -4761,7 +4761,7 @@ void LayoutContext::collectPage()
y = page->system(0)->y() + page->system(0)->height();
}
else {
y = page->tm();
y = page->tm();
}
for (int i = 1; i < pSystems; ++i) {
System* cs = page->system(i);
Expand All @@ -4773,7 +4773,7 @@ void LayoutContext::collectPage()
y += cs->height();
}

for (int k = 0;;++k) {
for (;;) {
//
// calculate distance to previous system
//
Expand Down Expand Up @@ -4892,7 +4892,7 @@ void LayoutContext::collectPage()
if (vbox) {
dist += vbox->bottomGap();
if (footerExtension > 0)
dist += footerExtension;
dist += footerExtension;
}
else if (!prevSystem->hasFixedDownDistance()) {
qreal margin = qMax(curSystem->minBottom(), curSystem->spacerDistance(false));
Expand All @@ -4908,9 +4908,9 @@ void LayoutContext::collectPage()
qreal footerPadding = 0.0;
// ensure it doesn't collide with footer
if (footerExtension > 0) {
footerPadding = footerExtension + headerFooterPadding;
dist += footerPadding;
}
footerPadding = footerExtension + headerFooterPadding;
dist += footerPadding;
}
dist = qMax(dist, slb);
layoutPage(page, endY - (y + dist), footerPadding);
// if we collected a system we cannot fit onto this page,
Expand Down

0 comments on commit 6a55590

Please sign in to comment.