From 51f89c97996baa41d2986463e44d36312c7956fc Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Fri, 21 Jul 2017 14:31:47 +0300 Subject: [PATCH] Do not round a piece data when export. --HG-- branch : develop --- src/libs/vlayout/vlayoutpiece.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/libs/vlayout/vlayoutpiece.cpp b/src/libs/vlayout/vlayoutpiece.cpp index e58effaf9..50e3ae8b3 100644 --- a/src/libs/vlayout/vlayoutpiece.cpp +++ b/src/libs/vlayout/vlayoutpiece.cpp @@ -298,16 +298,6 @@ QVector CorrectPosition(const QRectF &parentBoundingRect, QVector RoundPoints(QVector points) -{ - for (int i=0; i < points.size(); ++i) - { - points[i] = QPointF(qRound(points.at(i).x()), qRound(points.at(i).y())); - } - return points; -} - //--------------------------------------------------------------------------------------------------------------------- QVector PrepareAllowance(const QVector &points) { @@ -436,7 +426,7 @@ QVector VLayoutPiece::GetContourPoints() const //--------------------------------------------------------------------------------------------------------------------- void VLayoutPiece::SetCountourPoints(const QVector &points, bool hideMainPath) { - d->contour = RemoveDublicates(RoundPoints(points), false); + d->contour = RemoveDublicates(points, false); SetHideMainPath(hideMainPath); } @@ -457,7 +447,7 @@ void VLayoutPiece::SetSeamAllowancePoints(const QVector &points, bool s d->seamAllowance = points; if (not d->seamAllowance.isEmpty()) { - d->seamAllowance = RemoveDublicates(RoundPoints(d->seamAllowance), false); + d->seamAllowance = RemoveDublicates(d->seamAllowance, false); } else if (not IsSeamAllowanceBuiltIn()) { @@ -523,7 +513,7 @@ void VLayoutPiece::SetPieceText(const QString& qsName, const VPieceLabelData& da } QScopedPointer item(GetMainPathItem()); - d->detailLabel = CorrectPosition(item->boundingRect(), RoundPoints(v)); + d->detailLabel = CorrectPosition(item->boundingRect(), v); // generate text d->m_tmDetail.SetFont(font); @@ -582,7 +572,7 @@ void VLayoutPiece::SetPatternInfo(const VAbstractPattern* pDoc, const VPatternLa v[i] = RotatePoint(ptCenter, v.at(i), dAng); } QScopedPointer item(GetMainPathItem()); - d->patternInfo = CorrectPosition(item->boundingRect(), RoundPoints(v)); + d->patternInfo = CorrectPosition(item->boundingRect(), v); // Generate text d->m_tmPattern.SetFont(font); @@ -635,7 +625,7 @@ void VLayoutPiece::SetGrainline(const VGrainlineData& geom, const VContainer* pa } QScopedPointer item(GetMainPathItem()); - d->grainlinePoints = CorrectPosition(item->boundingRect(), RoundPoints(v)); + d->grainlinePoints = CorrectPosition(item->boundingRect(), v); } //---------------------------------------------------------------------------------------------------------------------