Measure numbers restart from 1 after section break even if the corresponding property got disabled

• Jul 18, 2019 - 19:44
Reported version
3.2
Priority
P1 - High
Type
Functional
Frequency
Few
Severity
S3 - Major
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
Yes
Project

Insert a section break into a score.
Right click the section break and open Section Break Properies.
Remove the check from "Start section with measure number 1"

Expected results: Measure numbers should not start over at 1
Actual results: Measure numbers restart at 1.

See attached score created in version 3.2.2.

Note: the frame around the measure number is not necessary, but was part of the score I was working on when I noticed the problem.

Attachment Size
section break bug.mscz 10.01 KB

Comments

Title Measure numbers always restart at 1 after section break Measure numbers restart at 1 after section break even if the corresponding property got disabled
Regression No Yes
Workaround No Yes

While fixing that issue it'd be useful to move the right-click properties of section breaks to the Inspector

This used to work in 2.x, so is a regression.
Workaround is to manually set a measurenumber offset to the first measure after the section break

I think I found why. In 2.3.2 MeasureBase::sectionBreak() directly returns LayoutBreak* so doLayout() can access the property of that LayoutBreak. But now it returns bool, so doLayout() can only check whether a section break exists (internally, this is to check whether flag(ElementFlag::SECTION_BREAK) is true), it cannot grab the property of it.

So to summarize, it's the new system of ElementFlag that blocked the access of section break property. Which means in order to fix this, sectionBreak() must return an actual LayoutBreak*, replacing the ElementFlag thing. I don't know if this break of consistency violates the coding principle, and if there's another way to do it, I'm willing to hear it.

Some places to check the code: in master: line 4432 in libmscore/layout.cpp, in 2.3.2: line 1461 in libmscore/layout.cpp, in master: line 164 in libmscore/measurebase.h, in 2.3.2: line 102 in libmscore/measurebase.h.

Title Measure numbers restart at 1 after section break even if the corresponding property got disabled Measure numbers restart at 1 after section break even if the corresponding property got disabled
Frequency Once Few

Actually I already found this issue while doing a big score which needed a handful of section breaks, but didn't remember to get it into the issue tracker.

Title Measure numbers restart at 1 after section break even if the corresponding property got disabled Measure numbers restart from 1 after section break even if the corresponding property got disabled
Status PR created fixed

Fixed in branch master, commit 9f1f540917

_fix #292343: measure numbers restart from 1 after section break even if the corresponding property got disabled

Some calls of sectionBreak() should be changed to sectionBreakElement() so the property can be accessed by sectionBreakElement()->startWithMeasureOne()._

In reply to by Jojo-Schmitz

And about moving the properties to the inspector, does this mean creating a new inspector UI AND disabling the access to them by right-clicking and popping-up a dialogue?

This makes me wonder why some elements have their properties in pop-up dialogues while others have theirs in the inspector right from the beginning...

Fix version
3.3.1