diff --git a/ChangeLog.txt b/ChangeLog.txt index e57f7db1c..ac828d8aa 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -13,6 +13,7 @@ - Fixed bug in dialog Internal Piece Path. Value from the field After rewrited data in the field Before. - Tab Pins moved to be second in the list after tab Paths. - Added tooltip for tab Passmark. Explained meaning of check box "Show the second passmark on seam line". +- [#696] Wrong grainline position on layout. # Version 0.5.0 May 9, 2017 - [#581] User can now filter input lists by keyword in function wizard. diff --git a/src/libs/vlayout/vlayoutpiece.cpp b/src/libs/vlayout/vlayoutpiece.cpp index 78c61f12c..3d4ec8c50 100644 --- a/src/libs/vlayout/vlayoutpiece.cpp +++ b/src/libs/vlayout/vlayoutpiece.cpp @@ -214,13 +214,12 @@ bool FindGrainlineGeometry(const VGrainlineData& geom, const VContainer *pattern { const auto centerPinPoint = pattern->GeometricObject(centerPin); - const qreal cLength = ToPixel(length, *pattern->GetPatternUnit()); QLineF grainline(centerPinPoint->x(), centerPinPoint->y(), - centerPinPoint->x() + cLength / 2.0, centerPinPoint->y()); + centerPinPoint->x() + length / 2.0, centerPinPoint->y()); - grainline.setAngle(rotationAngle); + grainline.setAngle(qRadiansToDegrees(rotationAngle)); grainline = QLineF(grainline.p2(), grainline.p1()); - grainline.setLength(cLength); + grainline.setLength(length); pos = grainline.p2(); }