fix #277759 Chord symbols sometimes add (much) too much space to measure
This commit is contained in:
parent
ba21d03c75
commit
23e9b8eb57
1 changed files with 4 additions and 3 deletions
|
@ -1180,13 +1180,14 @@ Shape ChordRest::shape() const
|
|||
for (Element* e : segment()->annotations()) {
|
||||
if (e->isHarmony() && e->staffIdx() == staffIdx()) {
|
||||
e->layout();
|
||||
x1 = qMin(x1, e->bbox().x() + e->pos().x());
|
||||
x2 = qMax(x2, x1 + e->bbox().width());
|
||||
qreal hx = e->bbox().x() - e->pos().x();
|
||||
x1 = qMin(x1, hx);
|
||||
x2 = qMax(x2, hx + e->bbox().width());
|
||||
adjustWidth = true;
|
||||
}
|
||||
}
|
||||
if (adjustWidth)
|
||||
shape.add(QRectF(x1, 0.0, x2-x1, 1.0));
|
||||
shape.add(QRectF(x1, 0.0, x2-x1, 0.0));
|
||||
|
||||
return shape;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue