Salome HOME
Issue #2082 Sketch multiple rotation does not work as expected: debug information
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_MultiTranslation.cpp
index 26023890ba26deff27198ee0ebaf1e614adfcb6f..7be4cccf21a7992e8fda6ea7938cb3242ab1a8d8 100644 (file)
@@ -11,6 +11,7 @@
 #include <GeomAPI_Ax1.h>
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Lin.h>
+#include <GeomAPI_Trsf.h>
 
 #include <ModelAPI_AttributeDouble.h>
 #include <ModelAPI_AttributeInteger.h>
@@ -112,6 +113,7 @@ void FeaturesPlugin_MultiTranslation::performOneDirection()
     std::string aFeatureError = "Multitranslation builder ";
     aFeatureError+=":: the number of copies for the first direction is null or negative.";
     setError(aFeatureError);
+    return;
   }
 
   // Moving each object.
@@ -247,12 +249,14 @@ void FeaturesPlugin_MultiTranslation::performTwoDirection()
     std::string aFeatureError = "Multitranslation builder ";
     aFeatureError+=":: the number of copies for the first direction is null or negative.";
     setError(aFeatureError);
+    return;
   }
 
   if (aSecondNbCopies <=0) {
     std::string aFeatureError = "Multitranslation builder ";
     aFeatureError+=":: the number of copies for the second direction is null or negative.";
     setError(aFeatureError);
+    return;
   }
 
   // Coord aFirstAxis