Excluding measure from measure count causes bad count; fixes on relayout

• Jan 8, 2019 - 16:17
Reported version
3.0
Type
Graphical (UI)
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
PR created
Regression
No
Workaround
No
Project

Steps to reproduce:
1. Create a new score
2. Exclude a measure from the measure count using Measure Properties

Expected:
All measure numbers after that measure are updated.

Actual:
Measure numbers are updated within the current system. The rest are updated when a relayout occurs.

Note:
The code also holds the wrong numbers until relayout. It is not just a graphical bug.


Comments

I notice that score()->setLayoutAll(); appears at the end of MeasureBase::setProperty(), but Measure::setProperty() has the line score()->setLayout(tick()); instead. And indeed, changing it to score()->setLayoutAll(); solves the issue. Of course, we need to be careful about only laying out what needs to be laid out, and only when necessary. But I am wondering whether this difference was intentional or not.

Another solution is to handle the cases for Pid::NO_OFFSET and Pid::IRREGULAR in MeasureBase::setProperty() rather than in Measure::setProperty(). This makes sense to me because setNoOffset() and setIrregular() are members of class MeasureBase.