Skip to content

Commit

Permalink
fix #33461 : hidden lines and slurs from v1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonioBL committed Oct 3, 2014
1 parent 9133473 commit eec14ad
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
9 changes: 8 additions & 1 deletion libmscore/line.cpp
Expand Up @@ -792,8 +792,15 @@ bool SLine::readProperties(XmlReader& e)
else if (tag == "Segment") {
LineSegment* ls = createLineSegment();
ls->read(e);
ls->setVisible(visible());
add(ls);
// in v1.x "visible" is a property of the segment only;
// we must ensure that it propagates also to the parent element.
// That's why the visibility is set after adding the segment
// to the corresponding spanner
if (score()->mscVersion() <= 114)
ls->setVisible(ls->visible());
else
ls->setVisible(visible());
}
else if (tag == "length")
setLen(e.readDouble());
Expand Down
6 changes: 6 additions & 0 deletions libmscore/slur.cpp
Expand Up @@ -1024,6 +1024,12 @@ bool SlurTie::readProperties(XmlReader& e)
SlurSegment* segment = new SlurSegment(score());
segment->read(e);
add(segment);
// in v1.x "visible" is a property of the segment only;
// we must ensure that it propagates also to the parent element
// That's why the visibility is set after adding the segment
// to the corresponding spanner
if (score()->mscVersion() <= 114)
segment->SpannerSegment::setVisible(segment->visible());
}
else if (tag == "up")
_slurDirection = MScore::Direction(e.readInt());
Expand Down

0 comments on commit eec14ad

Please sign in to comment.