Fix bug with flipped piece and follow grainline option.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-12-31 11:33:20 +02:00
parent a35a6f2e55
commit da0ee5ce6f

View File

@ -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)