Allow visibility control of passmarks.

Passmark with 0 length and enabled manual control must not be visible. Equal to
not passmark state.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2020-01-10 12:19:07 +02:00
parent ac38d662bf
commit 0373f727c5

View File

@ -1075,6 +1075,16 @@ VPassmark VPiece::CreatePassmark(const QVector<VPieceNode> &path, int previousIn
return VPassmark();
}
if (passmarkSAPoint.IsManualPasskmarkLength()
&& passmarkSAPoint.GetPasskmarkLength() <= accuracyPointOnLine)
{
const QString infoMsg = tr("Notch for point '%1' in piece '%2' will be disabled. Manual length is less than "
"allowed value.")
.arg(VPiecePath::NodeName(path, passmarkIndex, data), GetName());
qInfo() << VAbstractApplication::patternMessageSignature + infoMsg;
return VPassmark();
}
VPiecePassmarkData passmarkData;
passmarkData.previousSAPoint = previousSAPoint;
passmarkData.passmarkSAPoint = passmarkSAPoint;