Fix crash when a grainline is empty.
This commit is contained in:
parent
bbc6f20237
commit
53f7d00e6d
|
@ -1204,9 +1204,10 @@ void VLayoutPiece::DrawMiniature(QPainter &painter) const
|
|||
painter.drawPath(VPlaceLabelItem::LabelShapePath(label.shape));
|
||||
}
|
||||
|
||||
QPainterPath path;
|
||||
|
||||
QVector<QPointF> gPoints = GetGrainline();
|
||||
if (not gPoints.isEmpty())
|
||||
{
|
||||
QPainterPath path;
|
||||
path.moveTo(gPoints.at(0));
|
||||
for (auto p : qAsConst(gPoints))
|
||||
{
|
||||
|
@ -1214,6 +1215,7 @@ void VLayoutPiece::DrawMiniature(QPainter &painter) const
|
|||
}
|
||||
painter.drawPath(path);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QGraphicsItem *VLayoutPiece::GetItem(bool textAsPaths) const
|
||||
|
|
Loading…
Reference in New Issue
Block a user