diff --git a/libmscore/measure.cpp b/libmscore/measure.cpp index 5c7a82c3f00b1..7e9a1a4ed6496 100644 --- a/libmscore/measure.cpp +++ b/libmscore/measure.cpp @@ -508,8 +508,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 score()->styleB(Sid::showMeasureNumberOne); if (score()->styleB(Sid::measureNumberSystem)) @@ -2618,8 +2617,13 @@ 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; } //--------------------------------------------------------- diff --git a/vtest/gen b/vtest/gen index b41819eb0f04f..16c931be48ec1 100755 --- a/vtest/gen +++ b/vtest/gen @@ -81,7 +81,7 @@ else layout-sequence-5 layout-sequence-6 layout-sequence-7 layout-sequence-8\ layout-sequence-9 layout-sequence-10 layout-sequence-11 layout-sequence-12\ layout-sequence-13 layout-sequence-14 layout-sequence-15 layout-sequence-16\ - measure-number-1 measure-number-2 measure-number-3 measure-number-4 measure-number-5\ + measure-number-1 measure-number-2 measure-number-3 measure-number-4 measure-number-5 measure-number-6\ custom-keysig-1 custom-keysig-2 custom-keysig-3 custom-keysig-4" fi diff --git a/vtest/gen.bat b/vtest/gen.bat index d74748bca7b1c..24f4c5cba928d 100644 --- a/vtest/gen.bat +++ b/vtest/gen.bat @@ -57,7 +57,7 @@ set SRC=bravura-mmrest,gonville-mmrest, ^ layout-sequence-5,layout-sequence-6,layout-sequence-7,layout-sequence-8, ^ layout-sequence-9,layout-sequence-10,layout-sequence-11,layout-sequence-12, ^ layout-sequence-13, layout-sequence-14, layout-sequence-15,layout-sequence-16, ^ - measure-number-1,measure-number-2,measure-number-3,measure-number-4,measure-number-5 ^ + measure-number-1,measure-number-2,measure-number-3,measure-number-4,measure-number-5 measure-number-6 ^ custom-keysig-1,custom-keysig-2,custom-keysig-2,custom-keysig-3,custom-keysig-4 IF NOT "%1"=="" ( diff --git a/vtest/measure-number-6-ref.png b/vtest/measure-number-6-ref.png new file mode 100644 index 0000000000000..eb1793fe4445e Binary files /dev/null and b/vtest/measure-number-6-ref.png differ diff --git a/vtest/measure-number-6.mscx b/vtest/measure-number-6.mscx new file mode 100644 index 0000000000000..391a2e8d534f1 --- /dev/null +++ b/vtest/measure-number-6.mscx @@ -0,0 +1,335 @@ + + + 3.6.3 + + + + 0 + 480 + + 1 + 1 + 1 + 0 + + Composer / arranger + + 2024-09-19 + + + + 3.02 + Linux + + + Subtitle + + + Untitled score + + Orchestra + + Oboen + +
+ flutes + oboes + clarinets + saxophones + bassoons + +
+
+ horns + trumpets + cornets + flugelhorns + trombones + baritone-horns + euphoniums + tubas +
+
+ timpani +
+
+ keyboard-percussion + drums + unpitched-metal-percussion + unpitched-wooden-percussion + other-percussion +
+ keyboards + harps + organs + synths +
+ plucked-strings +
+ +
+ voices +
+
+ orchestral-strings +
+ +
+ + + + stdNormal + + + Oboe + + Oboe + Ob. + Oboe + 58 + 96 + 58 + 87 + wind.reed.oboe + + + + Fluid + + + + + + 10 + + + Measure numbers + + + + Hide first - section break test + + + + Composer / arranger + + + + + + 4 + 4 + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + section + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + 5 + + section + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + section + + + + measure + 4/4 + + + + + 5 + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + 5 + + section + + + + 5 + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + + + + measure + 4/4 + + + + +
+