Fixed bug with internal path in layout piece.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2017-03-18 10:44:27 +02:00
parent 2bdfc59c21
commit 47e50fe06f
2 changed files with 2 additions and 3 deletions

View File

@ -70,7 +70,6 @@ VLayoutPiecePath::~VLayoutPiecePath()
QPainterPath VLayoutPiecePath::GetPainterPath() const QPainterPath VLayoutPiecePath::GetPainterPath() const
{ {
QPainterPath path; QPainterPath path;
path.setFillRule(Qt::WindingFill);
if (not d->m_points.isEmpty()) if (not d->m_points.isEmpty())
{ {
path.moveTo(d->m_points.at(0)); path.moveTo(d->m_points.at(0));
@ -78,7 +77,7 @@ QPainterPath VLayoutPiecePath::GetPainterPath() const
{ {
path.lineTo(d->m_points.at(j)); path.lineTo(d->m_points.at(j));
} }
path.lineTo(d->m_points.at(0)); path.setFillRule(Qt::WindingFill);
} }
return path; return path;
} }

View File

@ -346,7 +346,7 @@ QPainterPath VPiecePath::PainterPath(const VContainer *data) const
if (not points.isEmpty()) if (not points.isEmpty())
{ {
path.moveTo(points[0]); path.moveTo(points.at(0));
for (qint32 i = 1; i < points.count(); ++i) for (qint32 i = 1; i < points.count(); ++i)
{ {
path.lineTo(points.at(i)); path.lineTo(points.at(i));