Position of TextLine segments not preserved on saving and re-opening

• Nov 2, 2012 - 17:35
Type
Functional
Severity
S2 - Critical
Status
closed
Project

Context: githug commit 4afe07da6c

Steps:
1) Open the attached sample score
2) The lines in 1st voice, 1 measure and in 2nd voice 2nd measure have been originally moved to be above the notes: they are shown on top of the staff 1st line
3) Raise them two or three sp (I used the Inspector)
4) Save, close and re-open

Result: The lines are again on top of the staff 1st line.

Notes:
1) It looks like a call to adjustReadPos() is missing somewhere: possibly in TextLineSegment::layout() (file libmscore/textline.cpp)? I still do not understand how adjustReadPos() is intended to work, as the values in the <pos> tag seem relative to the system and then depend on layout details.

2) LineSegment::readProperties() (file libmscore/line.cpp) contains two else if (tag == "pos"): possibly it eventually works, but it looks strange anyway...

Thanks,

M.

Attachment Size
test_textline.mscx 10.95 KB

Comments

Status (old) patch (code needs review) fixed

TextLineSegment->layout() is called from derived classes OttavaLineSegment and VoltaLineSegment. Their call to adjustReadPos() will not work right anymore. A solution is to rename TextLineSegment->layout() into layout1() and call this from Ottava- and VoltaLineSegment. Create a new TextLineSegment->layout() which calls layout1() and then adjustReadPos().
I commited this in https://github.com/musescore/MuseScore/commit/d73451a2973312466161b4e6e…