Salome HOME
Fix for the issue #2753 : error when dump/load script
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Validators.cpp
index 8d785e658827d2d621b0d78407242db548749450..ccb43b40643951035c1df9b12e70711e5bcb9576 100644 (file)
@@ -547,6 +547,11 @@ bool FeaturesPlugin_ValidatorExtrusionDir::isValid(
       if(aContext.get()) {
         aDirShape = aContext->shape();
       }
+
+      if (aDirShape.get() && aDirShape->isCompound()) {
+        GeomAPI_ShapeIterator anIt(aDirShape);
+        aDirShape = anIt.current();
+      }
     }
   }
 
@@ -1685,8 +1690,10 @@ bool FeaturesPlugin_ValidatorBooleanCommonSelection::isValid(
     }
     std::shared_ptr<GeomAPI_Shape> aShape = anAttrSelection->value();
     GeomShapePtr aContextShape;
-    if (!aShape.get() && aContext.get()) {
+    if (aContext.get()) {
       aContextShape = aContext->shape();
+    }
+    if (!aShape.get()) {
       aShape = aContextShape;
     }
     if (!aShape.get()) {