Fix export passmarks for layout.
Because we did not search in united path we could not draw them and silently skipped. Now user also will see a warning. --HG-- branch : develop
This commit is contained in:
parent
a97c90378d
commit
d0cd313df0
|
@ -244,8 +244,8 @@ QVector<VLayoutPassmark> ConvertPassmarks(const VPiece &piece, const VContainer
|
|||
{
|
||||
VLayoutPassmark layoutPassmark;
|
||||
|
||||
VPiecePath path = piece.GetPath();
|
||||
const int nodeIndex = path.indexOfNode(pData.id);
|
||||
const QVector<VPieceNode> path = piece.GetUnitedPath(pattern);
|
||||
const int nodeIndex = VPiecePath::indexOfNode(path, pData.id);
|
||||
if (nodeIndex != -1)
|
||||
{
|
||||
layoutPassmark.lines = passmark.BuiltInSAPassmark(piece, pattern);
|
||||
|
@ -255,14 +255,21 @@ QVector<VLayoutPassmark> ConvertPassmarks(const VPiece &piece, const VContainer
|
|||
|
||||
layoutPassmarks.append(layoutPassmark);
|
||||
}
|
||||
else
|
||||
{
|
||||
const QString errorMsg =
|
||||
QObject::tr("Passmark '%1' is not part of piece '%2'.")
|
||||
.arg(pData.nodeName, piece.GetName());
|
||||
qApp->IsPedantic() ? throw VException(errorMsg) : qWarning() << errorMsg;
|
||||
}
|
||||
};
|
||||
|
||||
auto PrepareSAPassmark = [pData, passmark, piece, &layoutPassmarks, pattern](PassmarkSide side)
|
||||
{
|
||||
VLayoutPassmark layoutPassmark;
|
||||
|
||||
VPiecePath path = piece.GetPath();
|
||||
const int nodeIndex = path.indexOfNode(pData.id);
|
||||
const QVector<VPieceNode> path = piece.GetUnitedPath(pattern);
|
||||
const int nodeIndex = VPiecePath::indexOfNode(path, pData.id);
|
||||
if (nodeIndex != -1)
|
||||
{
|
||||
QVector<QLineF> lines =
|
||||
|
@ -282,6 +289,13 @@ QVector<VLayoutPassmark> ConvertPassmarks(const VPiece &piece, const VContainer
|
|||
|
||||
layoutPassmarks.append(layoutPassmark);
|
||||
}
|
||||
else
|
||||
{
|
||||
const QString errorMsg =
|
||||
QObject::tr("Passmark '%1' is not part of piece '%2'.")
|
||||
.arg(pData.nodeName, piece.GetName());
|
||||
qApp->IsPedantic() ? throw VException(errorMsg) : qWarning() << errorMsg;
|
||||
}
|
||||
};
|
||||
|
||||
if (not piece.IsSeamAllowanceBuiltIn())
|
||||
|
|
Loading…
Reference in New Issue
Block a user