Merge pull request #4408 from dmitrio95/278975-section-break-keysig

fix #278975: rewrite the condition for showing naturals on keysig change
This commit is contained in:
anatoly-os 2018-12-18 17:25:24 +02:00 committed by GitHub
commit 486c90c23e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -134,9 +134,12 @@ void KeySig::layout()
Measure* prevMeasure = measure() ? measure()->prevMeasure() : 0;
// If we're not force hiding naturals (Continuous panel), use score style settings
if (!_hideNaturals)
naturalsOn = (prevMeasure && !prevMeasure->sectionBreak()
&& (score()->styleI(Sid::keySigNaturals) != int(KeySigNatural::NONE))) || (t1 == 0);
if (!_hideNaturals) {
const bool newSection = (!segment()
|| (segment()->rtick() == 0 && (!prevMeasure || prevMeasure->sectionBreak()))
);
naturalsOn = !newSection && (score()->styleI(Sid::keySigNaturals) != int(KeySigNatural::NONE) || (t1 == 0));
}
// Don't repeat naturals if shown in courtesy