fix #287871: volta line not drawn before start repeat

This commit is contained in:
Marc Sabatella 2019-07-13 21:19:54 -06:00
parent fa50dff518
commit d2278d6742

View file

@ -668,15 +668,15 @@ QPointF SLine::linePos(Grip grip, System** sys) const
while (seg && seg->segmentType() != SegmentType::EndBarLine)
seg = seg->prev();
if (!seg || !seg->enabled()) {
// no end bar line; look for BeginBarLine of next measure
// no end bar line; look for BeginBarLine or StartRepeatBarLine of next measure
Measure* nm = m->nextMeasure();
if (nm->system() == m->system())
seg = nm->first(SegmentType::BeginBarLine);
seg = nm->first(SegmentType::BeginBarLine|SegmentType::StartRepeatBarLine);
}
qreal mwidth = seg ? seg->x() : m->bbox().right();
qreal mwidth = seg && seg->measure() == m ? seg->x() : m->bbox().right();
x = m->pos().x() + mwidth;
// align to barline
if (seg && seg->isEndBarLineType()) {
if (seg && (seg->segmentType() & SegmentType::BarLineType)) {
Element* e = seg->element(0);
if (e && e->type() == ElementType::BAR_LINE) {
BarLineType blt = toBarLine(e)->barLineType();
@ -985,7 +985,7 @@ void SLine::writeProperties(XmlWriter& xml) const
//
bool modified = false;
for (const SpannerSegment* seg : spannerSegments()) {
if (!seg->autoplace() || !seg->visible() ||
if (!seg->autoplace() || !seg->visible() ||
(!seg->isStyled(Pid::OFFSET) && (!seg->offset().isNull() || !seg->userOff2().isNull()))) {
modified = true;
break;