Fixed crash. If we have no points in the seam allowence path just don't show

him.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2015-03-28 14:26:49 +02:00
parent f97a077dcd
commit b104f0dfa5

View File

@ -462,15 +462,18 @@ QPainterPath VDetail::ContourPath(const VContainer *data) const
// seam allowence
if (getSeamAllowance() == true)
{
QPainterPath ekv;
ekv.moveTo(pointsEkv.at(0));
for (qint32 i = 1; i < pointsEkv.count(); ++i)
if (not pointsEkv.isEmpty())
{
ekv.lineTo(pointsEkv.at(i));
}
QPainterPath ekv;
ekv.moveTo(pointsEkv.at(0));
for (qint32 i = 1; i < pointsEkv.count(); ++i)
{
ekv.lineTo(pointsEkv.at(i));
}
path.addPath(ekv);
path.setFillRule(Qt::WindingFill);
path.addPath(ekv);
path.setFillRule(Qt::WindingFill);
}
}
return path;