Skip to content

Commit

Permalink
fix #293531: clef&key appear on second system after layout with gen c…
Browse files Browse the repository at this point in the history
…lef&key disabled

In #4866 I added code
to better handle the detection of the end of the layout range.
Part of this was to re-establish the header in the first measure after the end of the range.
But my code mistakenly passed in lc.firstSystem as the firstSystem parameter.
Thus it treated the *second* system as if it was the first,
since lc.firstSystem was set based on the system we just completed,
not the system we are about to consider.
Fix is to calculate when this new system is actually the first system of a section or not.
I calculate this the same way lc.firstMeasure itself is calculated.
  • Loading branch information
MarcSabatella committed Aug 23, 2019
1 parent b2dffcd commit ccb8fe0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libmscore/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3437,8 +3437,9 @@ System* Score::collectSystem(LayoutContext& lc)
if (!s->enabled())
s->setEnabled(true);
}
bool firstSystem = lc.prevMeasure->sectionBreak() && _layoutMode != LayoutMode::FLOAT;
if (curHeader)
m->addSystemHeader(lc.firstSystem);
m->addSystemHeader(firstSystem);
else
m->removeSystemHeader();
if (curTrailer)
Expand Down

0 comments on commit ccb8fe0

Please sign in to comment.