From 4fc652b46021b6a456b99297904b7ec68d3a74ed Mon Sep 17 00:00:00 2001 From: Wanderer Fan Date: Mon, 6 Jun 2022 11:43:28 -0400 Subject: [PATCH] [TD]abort dimensioning of spline edge --- src/Mod/TechDraw/Gui/CommandCreateDims.cpp | 26 +++++----------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/src/Mod/TechDraw/Gui/CommandCreateDims.cpp b/src/Mod/TechDraw/Gui/CommandCreateDims.cpp index 81252efc6f..8039a2a694 100644 --- a/src/Mod/TechDraw/Gui/CommandCreateDims.cpp +++ b/src/Mod/TechDraw/Gui/CommandCreateDims.cpp @@ -315,16 +315,9 @@ void CmdTechDrawRadiusDimension::activated(int iMsg) return; } } else if (edgeType == isBSpline) { - QMessageBox::StandardButton result = - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("BSpline Curve Warning"), - QObject::tr("Selected edge is a BSpline. Radius will be approximate. Continue?"), - QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel); - if (result == QMessageBox::Ok) { - objs.push_back(objFeat); - subs.push_back(SubNames[0]); - } else { - return; - } + QMessageBox::critical(Gui::getMainWindow(), QObject::tr("BSpline Curve Error"), + QObject::tr("Selected edge is a BSpline and a radius can not be calculated.")); + return; } else { QMessageBox::warning( Gui::getMainWindow(), QObject::tr("Incorrect Selection"), @@ -438,16 +431,9 @@ void CmdTechDrawDiameterDimension::activated(int iMsg) return; } } else if (edgeType == isBSpline) { - QMessageBox::StandardButton result = - QMessageBox::warning(Gui::getMainWindow(), QObject::tr("BSpline Curve Warning"), - QObject::tr("Selected edge is a BSpline. Diameter will be approximate. Continue?"), - QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel); - if (result == QMessageBox::Ok) { - objs.push_back(objFeat); - subs.push_back(SubNames[0]); - } else { - return; - } + QMessageBox::critical(Gui::getMainWindow(), QObject::tr("BSpline Curve Error"), + QObject::tr("Selected edge is a BSpline and a diameter can not be calculated.")); + return; } else { QMessageBox::warning( Gui::getMainWindow(), QObject::tr("Incorrect Selection"),