Salome HOME
[Code coverage FeaturesPlugin]: Cover errors of LinearCopy, AngularCopy and Fillet...
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_MultiTranslation.cpp
index d0e5360c4cb84c4b62ce5dae05770b381afd0fb2..ba1c1e8dfef99da42399c8960a6a2f15449ea977 100644 (file)
@@ -88,6 +88,7 @@ void FeaturesPlugin_MultiTranslation::performOneDirection()
   AttributeSelectionListPtr anObjectsSelList =
     selectionList(FeaturesPlugin_MultiTranslation::OBJECTS_LIST_ID());
   if (anObjectsSelList->size() == 0) {
+    setError("Error: empty selection list");
     return;
   }
   for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
@@ -125,11 +126,6 @@ void FeaturesPlugin_MultiTranslation::performOneDirection()
     GeomAPI_ShapeIterator anIt(aShape);
     anEdge = anIt.current()->edge();
   }
-  else
-  {
-    setError(aSelectionError);
-    return;
-  }
 
   if (!anEdge.get())
   {
@@ -222,6 +218,7 @@ void FeaturesPlugin_MultiTranslation::performTwoDirection()
   AttributeSelectionListPtr anObjectsSelList =
     selectionList(FeaturesPlugin_MultiTranslation::OBJECTS_LIST_ID());
   if (anObjectsSelList->size() == 0) {
+    setError("Error: empty selection list");
     return;
   }
   for(int anObjectsIndex = 0; anObjectsIndex < anObjectsSelList->size(); anObjectsIndex++) {
@@ -259,11 +256,6 @@ void FeaturesPlugin_MultiTranslation::performTwoDirection()
     GeomAPI_ShapeIterator anIt(aShape);
     anEdge = anIt.current()->edge();
   }
-  else
-  {
-    setError(aSelectionError);
-    return;
-  }
 
   if (!anEdge.get())
   {
@@ -296,11 +288,6 @@ void FeaturesPlugin_MultiTranslation::performTwoDirection()
     GeomAPI_ShapeIterator anIt(aShape);
     anEdge = anIt.current()->edge();
   }
-  else
-  {
-    setError(aSelectionError);
-    return;
-  }
 
   if (!anEdge.get())
   {