Refactoring.
Merge "if" statement with the enclosing one.
This commit is contained in:
parent
be1a8d15d0
commit
e5295c0665
|
@ -1616,20 +1616,18 @@ auto VLayoutPiece::ContourPath(bool togetherWithNotches, bool showLayoutAllowanc
|
||||||
}
|
}
|
||||||
path.addPath(passmaksPath);
|
path.addPath(passmaksPath);
|
||||||
|
|
||||||
if (!d->m_seamAllowanceMirrorLine.isNull() && IsShowFullPiece())
|
if (!d->m_seamAllowanceMirrorLine.isNull() && IsShowFullPiece() &&
|
||||||
|
!VGObject::IsPointOnLineviaPDP(passmark.baseLine.p1(), d->m_seamAllowanceMirrorLine.p1(),
|
||||||
|
d->m_seamAllowanceMirrorLine.p2()))
|
||||||
{
|
{
|
||||||
if (!VGObject::IsPointOnLineviaPDP(passmark.baseLine.p1(), d->m_seamAllowanceMirrorLine.p1(),
|
QPainterPath mirroredPassmaksPath;
|
||||||
d->m_seamAllowanceMirrorLine.p2()))
|
for (const auto &line : passmark.lines)
|
||||||
{
|
{
|
||||||
QPainterPath mirroredPassmaksPath;
|
mirroredPassmaksPath.moveTo(line.p1());
|
||||||
for (const auto &line : passmark.lines)
|
mirroredPassmaksPath.lineTo(line.p2());
|
||||||
{
|
|
||||||
mirroredPassmaksPath.moveTo(line.p1());
|
|
||||||
mirroredPassmaksPath.lineTo(line.p2());
|
|
||||||
}
|
|
||||||
const QTransform matrix = VGObject::FlippingMatrix(d->m_seamAllowanceMirrorLine);
|
|
||||||
path.addPath(matrix.map(mirroredPassmaksPath));
|
|
||||||
}
|
}
|
||||||
|
const QTransform matrix = VGObject::FlippingMatrix(d->m_seamAllowanceMirrorLine);
|
||||||
|
path.addPath(matrix.map(mirroredPassmaksPath));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user