Skip to content

Commit

Permalink
Merge pull request #4393 from pthvogt/volta_layout_twice
Browse files Browse the repository at this point in the history
fix #279995: second (unneeded) layout of voltas in linear view removed.
  • Loading branch information
anatoly-os committed Dec 14, 2018
2 parents ff97147 + e09d990 commit f2e1c8d
Showing 1 changed file with 0 additions and 35 deletions.
35 changes: 0 additions & 35 deletions libmscore/layoutlinear.cpp
Expand Up @@ -420,41 +420,6 @@ void LayoutContext::layoutLinear()
}
}

//
// Volta
//

if (etick > stick) { // ignore vbox
auto spanners = score->spannerMap().findOverlapping(stick, etick);

std::vector<Spanner*> voltas;

for (auto interval : spanners) {
Spanner* sp = interval.value;
if (sp->tick() < etick && sp->tick2() > stick) {
if (sp->isVolta())
voltas.push_back(sp);
}
}
processLines(system, voltas, false);

//
// vertical align volta segments
//
std::vector<SpannerSegment*> voltaSegments;
for (SpannerSegment* ss : system->spannerSegments()) {
if (ss->isVoltaSegment())
voltaSegments.push_back(ss);
}
if (voltaSegments.size() > 1) {
qreal y = 0;
for (SpannerSegment* ss : voltaSegments)
y = qMin(y, ss->offset().y());
for (SpannerSegment* ss : voltaSegments)
ss->ryoffset() = y;
}
}

score->layoutLyrics(system);

for (Spanner* sp : score->unmanagedSpanners()) {
Expand Down

0 comments on commit f2e1c8d

Please sign in to comment.