Measure Number Offset Value Changes Everytime Opening the File
Description:
If the measure number offset is modified by user, MuseScore automatically change the offset value each time reopening the score file.
more infos here: Measure Number Offset Value Changes Everytime Opening the File
Steps to reproduce:
- Create a new score.
- Select a measure number text and modify its offset value (either X or Y or both).
- Save the file.
- Reopen the file. Check the measure number offset value we've modified in Step 2.
Expected behavior: The offset value should be the same with the value when we save the file.
Actual behavior: The offset value changes each time we reopen the score file.
Version number: MuseScore 3.6.0.485471459, revision: 269baf7
Operating system: Windows 10 (10.0), Arch.: x86_64
Here is a test file that I've modified both X and Y value of the measure number offset at Measure 18 to 5sp. But both value change to 2.86sp when reopening it. The values will also change again if we save the file and reopen it.
measure_number_offset_change.mscz
I've also checked the nightly build MuseScore version (64-bit): 3.6.0.495159827, revision: c094067, and the issue can be reproduced.
Comments
https://github.com/musescore/MuseScore/pull/7269
My score seems to save to left alignment for the measure numbers which makes the numbers (especially double digit ones) look too far to the right. Temporary fix is to make sure the styling is X: 0.00 and Y: 2.00 with the center text alignment option selected (not the left align that seems to be the broken default).
Fixed in branch 3.x, commit 3203f5b45b
_fix #315781: measure number offset changes on reload
Resolves: https://musescore.org/en/node/315781
Measure numbers were formerly scaled with spatium, but now they are not.
The offset should still be in sp rather than mm,
so a new fucntionoffsetIsSpatiumDependent() was introduced,
analogous to sizeIsSpatiumDependent(), to allow measure numbers
to have size not scale with spatium but keep the scaling of offset.
However, the function depended on checking the parent of the element,
on the idea that measure numebrs are attached to measures,
whereas other non-spatium-dependent elements like title text are not.
Unfortunately, during score read, parent is not set yet,
so this check was failing.
Instead, this commit checks the ON_STAFF element flag,
which really tells us the same basic thing.
So, for measure numbers, ON_STAFF is true,
so even though sizeIsSpatiumDependent is false,
offsetIsSpatiumDependent will return true.
For title text and other elements for which sizeIsSPatiumDependent,
ON_STAFF is false, so the offset will continue to not scale.
This is the correct solution going forward as well
should any other elements need to have size and offset scaling
managed differently._
Automatically closed -- issue fixed for 2 weeks with no activity.
In reply to Auto close by System Message
As of Oct 21 2022 the measure number offset still reverts to default when an instrument visibility is changed
OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.6.2.548021803, revision: 3224f34
I don't see that?
But if so, it'd be a new issue