From fbafe9f0525f3af84993d1baf41294e38e5d0144 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 24 Jul 2018 10:12:44 +0300 Subject: [PATCH] Forbid enabling notches before completed creation of main path. --HG-- branch : develop --- .../dialogs/tools/piece/dialogseamallowance.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp index 174eac69b..c698a8b18 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp @@ -618,9 +618,12 @@ void DialogSeamAllowance::ShowMainPathContextMenu(const QPoint &pos) } else { - actionPassmark = menu->addAction(tr("Passmark")); - actionPassmark->setCheckable(true); - actionPassmark->setChecked(rowNode.IsPassmark()); + if (applyAllowed) + { + actionPassmark = menu->addAction(tr("Passmark")); + actionPassmark->setCheckable(true); + actionPassmark->setChecked(rowNode.IsPassmark()); + } actionUniqueness = menu->addAction(tr("Check uniqueness")); actionUniqueness->setCheckable(true); @@ -651,7 +654,7 @@ void DialogSeamAllowance::ShowMainPathContextMenu(const QPoint &pos) rowItem->setText(GetNodeName(rowNode, true)); rowItem->setFont(NodeFont(rowItem->font(), rowNode.IsExcluded())); } - else if (selectedAction == actionPassmark) + else if (applyAllowed && selectedAction == actionPassmark) { rowNode.SetPassmark(not rowNode.IsPassmark()); rowItem->setData(Qt::UserRole, QVariant::fromValue(rowNode));