From 1fe72230961a71bede51acb152d696e9c0f98fb8 Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Sat, 20 Apr 2019 19:04:03 +0300 Subject: [PATCH] Fix checking double curve. --HG-- branch : develop --- src/libs/vtools/dialogs/tools/dialogtool.cpp | 8 ++++---- src/libs/vtools/dialogs/tools/dialogtool.h | 2 +- src/libs/vtools/dialogs/tools/piece/dialogpiecepath.cpp | 2 +- .../vtools/dialogs/tools/piece/dialogseamallowance.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libs/vtools/dialogs/tools/dialogtool.cpp b/src/libs/vtools/dialogs/tools/dialogtool.cpp index 030fa8253..f8440db8d 100644 --- a/src/libs/vtools/dialogs/tools/dialogtool.cpp +++ b/src/libs/vtools/dialogs/tools/dialogtool.cpp @@ -129,13 +129,13 @@ bool DoublePoint(const VPieceNode &firstNode, const VPieceNode &secondNode, cons } //--------------------------------------------------------------------------------------------------------------------- -bool DoubleCurve(const VPieceNode &firstNode, const VPieceNode &secondNode, const VContainer *data) +bool DoubleCurve(const VPieceNode &firstNode, const VPieceNode &secondNode) { if (firstNode.GetTypeTool() != Tool::NodePoint && not (firstNode.GetId() == NULL_ID) && secondNode.GetTypeTool() != Tool::NodePoint && not (secondNode.GetId() == NULL_ID)) { // don't ignore the same curve twice - if (data->GetGObject(firstNode.GetId())->getIdObject() == data->GetGObject(secondNode.GetId())->getIdObject()) + if (firstNode.GetId() == secondNode.GetId()) { return true; } @@ -556,7 +556,7 @@ bool DialogTool::DoublePoints(QListWidget *listWidget, const VContainer *data) } //--------------------------------------------------------------------------------------------------------------------- -bool DialogTool::DoubleCurves(QListWidget *listWidget, const VContainer *data) +bool DialogTool::DoubleCurves(QListWidget *listWidget) { SCASSERT(listWidget != nullptr); for (int i=0, sz = listWidget->count()-1; ihelpLabel->setText(url); return false; } - else if (DoubleCurves(ui->listWidget, data)) + else if (DoubleCurves(ui->listWidget)) { url += tr("The same curve repeats twice!"); ui->helpLabel->setText(url); diff --git a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp index a8658bfee..7f8f05b55 100644 --- a/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp +++ b/src/libs/vtools/dialogs/tools/piece/dialogseamallowance.cpp @@ -2563,7 +2563,7 @@ bool DialogSeamAllowance::MainPathIsValid() const uiTabPaths->helpLabel->setText(url); valid = false; } - else if (DoubleCurves(uiTabPaths->listWidgetMainPath, data)) + else if (DoubleCurves(uiTabPaths->listWidgetMainPath)) { url += tr("The same curve repeats twice!"); uiTabPaths->helpLabel->setText(url);