From 3e6012473696e5fd94e3c8240e2e1eda8def1743 Mon Sep 17 00:00:00 2001 From: Clarisse Genrault Date: Wed, 1 Mar 2017 15:29:59 +0100 Subject: [PATCH] Better management of errors. --- src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp | 6 +++--- src/PrimitivesPlugin/box_widget.xml | 3 --- src/PrimitivesPlugin/cylinder_widget.xml | 6 ------ 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp b/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp index 63236482b..83fbb8e88 100644 --- a/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp +++ b/src/PrimitivesPlugin/PrimitivesPlugin_Cylinder.cpp @@ -136,7 +136,7 @@ void PrimitivesPlugin_Cylinder::createCylinder(bool withAngle) // These checks should be made to the GUI for the feature but // the corresponding validator does not exist yet. if (!aCylinderAlgo->check()) { - setError(aCylinderAlgo->getError(), false); + setError(aCylinderAlgo->getError()); return; } @@ -146,12 +146,12 @@ void PrimitivesPlugin_Cylinder::createCylinder(bool withAngle) // Check if the creation of the cylinder if(!aCylinderAlgo->isDone()) { // The error is not displayed in a popup window. It must be in the message console. - setError(aCylinderAlgo->getError(), false); + setError(aCylinderAlgo->getError()); return; } if(!aCylinderAlgo->checkValid("Cylinder builder")) { // The error is not displayed in a popup window. It must be in the message console. - setError(aCylinderAlgo->getError(), false); + setError(aCylinderAlgo->getError()); return; } diff --git a/src/PrimitivesPlugin/box_widget.xml b/src/PrimitivesPlugin/box_widget.xml index 8f0f205d5..9d6368383 100644 --- a/src/PrimitivesPlugin/box_widget.xml +++ b/src/PrimitivesPlugin/box_widget.xml @@ -8,7 +8,6 @@ label="DX" step="1.0" default="10.0" - min = "0.0" icon="" tooltip="Dimension in X"> @@ -17,7 +16,6 @@ label="DY" step="1.0" default="10.0" - min = "0.0" icon="" tooltip="Dimension in Y"> @@ -26,7 +24,6 @@ label="DZ" step="1.0" default="10.0" - min = "0.0" icon="" tooltip="Dimension in Z"> diff --git a/src/PrimitivesPlugin/cylinder_widget.xml b/src/PrimitivesPlugin/cylinder_widget.xml index 780e29384..457119415 100644 --- a/src/PrimitivesPlugin/cylinder_widget.xml +++ b/src/PrimitivesPlugin/cylinder_widget.xml @@ -28,7 +28,6 @@ label="radius" step="1." default="5." - min="0." icon="icons/Primitives/radius.png" tooltip="Enter the radius of the cylinder"> @@ -37,7 +36,6 @@ label="height" step="1." default="10." - min="0." icon="icons/Primitives/dimension_v.png" tooltip="Enter the height of the cylinder"> @@ -68,7 +66,6 @@ label="radius" step="1." default="5." - min="0." icon="icons/Primitives/radius.png" tooltip="Enter the radius of the cylinder"> @@ -77,7 +74,6 @@ label="height" step="1." default="10." - min="0." icon="icons/Primitives/dimension_v.png" tooltip="Enter the height of the cylinder"> @@ -86,8 +82,6 @@ label="angle" step="10." default="45.0" - min="0." - max="360." icon="icons/Primitives/angle.png" tooltip="Enter the angle of the portion of the cylinder"> -- 2.39.2