Fix updating notches.
This commit is contained in:
parent
6dfa13ec9a
commit
ee705768e9
|
@ -270,13 +270,14 @@ auto RenderSeamAllowancePath(const VPiece &detail, bool combineTogether, const V
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
auto RenderPassmarks(const VPiece &detail, const VContainer *data) -> QPainterPath
|
||||
{
|
||||
const QLineF mirrorLine = detail.SeamMirrorLine(data);
|
||||
if (!mirrorLine.isNull() && detail.IsShowFullPiece())
|
||||
if (const QLineF mirrorLine = detail.SeamMirrorLine(data); !mirrorLine.isNull() && detail.IsShowFullPiece())
|
||||
{
|
||||
QPainterPath path;
|
||||
if (!detail.IsSeamAllowance())
|
||||
{
|
||||
return {};
|
||||
}
|
||||
|
||||
if (detail.IsSeamAllowance())
|
||||
{
|
||||
QPainterPath path;
|
||||
const QTransform matrix = VGObject::FlippingMatrix(mirrorLine);
|
||||
const QVector<VLayoutPassmark> passmarks = VLayoutPiece::ConvertPassmarks(detail, data);
|
||||
for (const auto &passmark : passmarks)
|
||||
|
@ -300,7 +301,6 @@ auto RenderPassmarks(const VPiece &detail, const VContainer *data) -> QPainterPa
|
|||
path.addPath(matrix.map(mirroredPassmaksPath));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
@ -1093,7 +1093,7 @@ void VToolSeamAllowance::UpdatePatternInfo()
|
|||
void VToolSeamAllowance::UpdatePassmarks()
|
||||
{
|
||||
const VPiece detail = VAbstractTool::data.GetPiece(m_id);
|
||||
m_passmarks->setPath(detail.PassmarksPath(getData()));
|
||||
m_passmarks->setPath(RenderPassmarks(detail, getData()));
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue
Block a user