Salome HOME
Tests fix
[modules/shaper.git] / src / FeaturesPlugin / FeaturesPlugin_Validators.cpp
index 411a6470ba67a5ef1daa2270d86c70a7e8482df9..aa78551d6b665e30f0dcf7a03d678694efa7bb1a 100644 (file)
@@ -141,12 +141,6 @@ bool FeaturesPlugin_ValidatorPipeLocations::isValid(const AttributePtr& theAttri
         return false;
       }
     }
-    ResultConstructionPtr aResultConstruction =
-      std::dynamic_pointer_cast<ModelAPI_ResultConstruction>(aContext);
-    if (aResultConstruction.get()) {
-      theError = "Error: Result construction not allowed for selection.";
-      return false;
-    }
     std::shared_ptr<GeomAPI_Shape> aShape = anAttrSelection->value();
     if (!aShape.get() && aContext.get()) {
       GeomShapePtr aContextShape = aContext->shape();
@@ -1691,8 +1685,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()) {