Merge pull request #4777 from dmitrio95/beam-layout2-chord-conversion

Fix assertion failure due to ChordRest conversion in Beam::layout2
This commit is contained in:
anatoly-os 2019-03-07 14:09:58 +02:00 committed by GitHub
commit 18fb31a20e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1589,12 +1589,12 @@ void Beam::layout2(std::vector<ChordRest*>crl, SpannerSegmentType, int frag)
qreal y1 = -200000;
qreal y2 = 200000;
for (size_t i = 0; i < n; ++i) {
Chord* c = toChord(crl.at(i));
const ChordRest* c = crl.at(i);
qreal y;
if (c->isRest())
continue; //y = c->pagePos().y();
else
y = c->upNote()->pagePos().y();
y = toChord(c)->upNote()->pagePos().y();
y1 = qMax(y1, y);
y2 = qMin(y2, y);
}