Skip to content

Commit

Permalink
Ensure the first keySig is properly flagged as Header
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-spa committed Feb 27, 2025
1 parent b94efb0 commit 057bda5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/engraving/rendering/score/measurelayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2507,7 +2507,6 @@ Segment* MeasureLayout::addHeaderKeySig(Measure* m, bool isFirstKeysig, const St
if ((isFirstKeysig || ctx.conf().styleB(Sid::genKeysig)) && isPitchedStaff) {
if (!kSegment) {
kSegment = Factory::createSegment(m, SegmentType::KeySig, Fraction(0, 1));
kSegment->setHeader(true);
m->add(kSegment);
}
if (!keysig) {
Expand All @@ -2523,6 +2522,7 @@ Segment* MeasureLayout::addHeaderKeySig(Measure* m, bool isFirstKeysig, const St
keysig->setKeySigEvent(keyIdx);
keysig->mutldata()->reset();
TLayout::layoutKeySig(keysig, keysig->mutldata(), ctx.conf());
kSegment->setHeader(true);
kSegment->setEnabled(true);
} else if (keysig && isPitchedStaff) {
// do not remove user modified keysigs
Expand Down

0 comments on commit 057bda5

Please sign in to comment.