Excluding measure from measure count causes bad count; fixes on relayout
Reported version
3.0
Type
Graphical (UI)
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
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 ofMeasureBase::setProperty()
, butMeasure::setProperty()
has the linescore()->setLayout(tick());
instead. And indeed, changing it toscore()->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
andPid::IRREGULAR
inMeasureBase::setProperty()
rather than inMeasure::setProperty()
. This makes sense to me becausesetNoOffset()
andsetIrregular()
are members ofclass MeasureBase
.I guess #281327: Measure Numbers and Section Break is related
See https://github.com/musescore/MuseScore/pull/4549.
Does that PR also cover #281327: Measure Numbers and Section Break?
My patch, in its current form, does not fix #281327: Measure Numbers and Section Break. These two issues should probably be dealt with together.
Sorry, posts crossed.
It turns out these two issues are unrelated after all. So I think two separate PRs are in order.
Fixed in branch master, commit b702d582f9
fix #281426: Excluding measure from measure count causes bad count; fixes on relayout
Fixed in branch master, commit de2fc4db05
_Merge pull request #4549 from mattmcclinch/281426-exclude-measure
fix #281426: Excluding measure from measure count causes bad count; fixes on relayout_
Fixed in branch 3.0.5, commit cf9aa04c58
_Merge pull request #4549 from mattmcclinch/281426-exclude-measure
fix #281426: Excluding measure from measure count causes bad count; fixes on relayout_
Automatically closed -- issue fixed for 2 weeks with no activity.