Skip to content

Commit

Permalink
fix #24809 in section breaks, take also frames into account
Browse files Browse the repository at this point in the history
  • Loading branch information
sammik committed Sep 19, 2024
1 parent 086b3b9 commit c2c16cf
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/engraving/dom/measure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,7 @@ bool Measure::showsMeasureNumberInAutoMode()

// Measure numbers should not show on first measure unless specified with Sid::showMeasureNumberOne
// except, when showing numbers on each measure, and first measure is after anacrusis - then show always
if (!prevMeasure || prevMeasure->sectionBreak()
|| (prevMeasure->irregular() && prevMeasure->isFirstInSection() && interval != 1)) {
if (isFirstInSection() || (prevMeasure->irregular() && prevMeasure->isFirstInSection() && interval != 1)) {
return style().styleB(Sid::showMeasureNumberOne);
}

Expand Down Expand Up @@ -1977,8 +1976,14 @@ bool Measure::isFirstInSystem() const

bool Measure::isFirstInSection() const
{
Measure* prevMeasure = this->prevMeasure();
return !prevMeasure || prevMeasure->sectionBreak();
for (MeasureBase* m = prev(); m; m = m->prev()) {
if (m->sectionBreak()) {
return true;
} else if (m->isMeasure()) {
return false;
}
}
return true;
}

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

0 comments on commit c2c16cf

Please sign in to comment.