Relative text position inside a frame is not saved for scores imported from 2.x

• Feb 22, 2020 - 14:31
Reported version
3.4
Type
Functional
Frequency
Once
Severity
S4 - Minor
Reproducibility
Always
Status
closed
Regression
Yes
Workaround
No
Project

Steps:
1- Load attached score "frametext_v2.mscz"; no matter if you choose to reset or not in the dialog which appears; note the relative positions of text inside the frame;
2- Save it with another name;
3- Open this new file: some texts lose their relative positioning inside the text frame.
Here is how the file appears on import:
imported.jpg
and here how the saved file appears:
saved_reloaded.jpg

Windows 10, commit 66c38772
but also under Linux Mint 19.3 and for stable version 3.4.2

Attachment Size
frametext_v2.mscz 4.41 KB

Comments

Status PR created fixed

Fixed in branch master, commit 2baa558a12

_fix #301478: Relative text position inside a frame is not saved for scores imported from 2.x

Resolves: https://musescore.org/en/node/301478.

When importing scores from 1.x or 2.x, the property flags for styled properties must be set to UNSTYLED. Otherwise, the properties will not be written when the score is saved. ScoreElement::readProperty() should be used wherever possible, since it takes care of setting the property flags correctly. When it is not possible to use ScoreElement::readProperty(), ScoreElement::setPropertyFlags() must be called after setting the property._

Fix version
3.5.0