Setting lyrics y-offsets in parts doesn't survive save/close/open

• Oct 7, 2019 - 15:26
Reported version
P1 - High
S3 - Major

In a score with parts and lyrics, in the part set a lyrics offset away from default, e.g. y-offset from 3 to 7
save, close, open.

expected result: offset is still the same

actual result: offset is back to default values (x:0 y:3, but shows those as not being the defaults, i.e. the reset button is enabled)

Observed in 3.2.3 and 3.3RC

MuseScore 2.3.2 doesn't have this issue -> regression


Priority P1 - High

Confirmed. X offset works, Y offset gets cleared. All work fine in score, just not in the part, which seems strange to me as the code dealing with this in theory shouldn't know the difference.

Title Setting lyrics offsets in parts doesn't survive save/close/open Setting lyrics y-offsets in parts doesn't survive save/close/open

I wonder whether autoplace is involved here

Right, in the original 3, it wasn't possible at all to change Y offset, as you may recall, because autoplace was too ruthless. So I'm assuming somehow the issue is in my change to that algorithm for 3.1. Or, maybe it was lurking somewhere deeper (like in lyrics read code) but couldn't be triggered until 3.1 because there was no way to change the offset in the first place. Well, you could change it, but it had no effect.

Ah, never mind, I figured it out: it is in Lyrics::read(), but it's due to the code I added to reset offsets made pre-3.1, since they previously didn't have any effect. I guess the code I have to check whether a score is pre-3.1 thinks parts are pre-3.1, because mscoreVersion() returns "" for parts. Grr.

Status PR created fixed

Fixed in branch master, commit 30e1ea9674

_fix #295357: lyrics Y offset in parts lost on save/reload

In 3.0 - 3.0.5, it was not possible to change the Y position of lyrics.
You could try, and an offset would be recorded, but it would have no effect on layout.
Starting with 3.1, it became possible to change the Y position for lyrics.
For compatibility, we cleared the Y offset when reading 3.0 - 3.0.5 scores,
since it would have been ignored originally.
However, the code doing the version check fails in parts,
because mscoreVersion() returns an empty stirng in that case.
This change simply amends the check to use masterScore() rather than score(),
so parts no longer return an empty version,
and also adds an explicit check for the version being empty,
so the check works correctly in test mode,
where this field is often empty even for the master score._

Fix version