fix tst_compat test

This commit is contained in:
lasconic 2012-09-21 12:23:18 +02:00
parent 95e20c86d8
commit 571d60eb3b
3 changed files with 11 additions and 3 deletions

View file

@ -1779,7 +1779,7 @@ void Measure::write(Xml& xml, int staff, bool writeSystemElements) const
}
}
foreach (const Element* el, _el) {
if ((el->staffIdx() == staff) || (el->systemFlag() && writeSystemElements)) {
if (!el->generated() && ((el->staffIdx() == staff) || (el->systemFlag() && writeSystemElements))) {
el->write(xml);
}
}
@ -2142,8 +2142,14 @@ void Measure::read(const QDomElement& de, int staffIdx)
Text* t = new Text(score());
t->setTrack(score()->curTrack);
t->read(e);
segment = getSegment(Segment::SegChordRest, score()->curTick);
segment->add(t);
//previous versions stored measure number, delete it
if(t->textStyleType() == TEXT_STYLE_MEASURE_NUMBER) {
delete t;
}
else {
segment = getSegment(Segment::SegChordRest, score()->curTick);
segment->add(t);
}
}
//----------------------------------------------------

View file

@ -71,6 +71,7 @@ p, li { white-space: pre-wrap; }
<Staff id="1">
<VBox>
<height>10</height>
<bottomGap>58.337</bottomGap>
<Text>
<halign>center</halign>
<valign>top</valign>

View file

@ -71,6 +71,7 @@ p, li { white-space: pre-wrap; }
<Staff id="1">
<VBox>
<height>10</height>
<bottomGap>58.337</bottomGap>
<Text>
<halign>center</halign>
<valign>top</valign>