From da0ee5ce6f5057a8e7e42561b4adfef55e89557b Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 31 Dec 2018 11:33:20 +0200 Subject: [PATCH] Fix bug with flipped piece and follow grainline option. --HG-- branch : develop --- src/libs/vlayout/vposition.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libs/vlayout/vposition.cpp b/src/libs/vlayout/vposition.cpp index 700e42b82..d7926e41c 100644 --- a/src/libs/vlayout/vposition.cpp +++ b/src/libs/vlayout/vposition.cpp @@ -607,6 +607,13 @@ void VPosition::FollowGrainline() QLineF detailGrainline(10, 10, 100, 10); detailGrainline.setAngle(detail.GrainlineAngle()); + if (detail.IsForceFlipping()) + { + VLayoutPiece workDetail = detail; // We need copy for temp change + workDetail.Mirror(not followGrainline ? gContour.GlobalEdge(j) : QLineF(10, 10, 10, 100)); + detailGrainline = workDetail.GetMatrix().map(detailGrainline); + } + const qreal angle = detailGrainline.angleTo(FabricGrainline()); if (detail.GrainlineArrowType() == ArrowType::atFront)