Salome HOME
Tooltips update for extrusion and revolution
[modules/shaper.git] / src / GeomValidators / GeomValidators_ConstructionComposite.cpp
index fea2319925f92521a50aac085a7f37678041971b..afd84190e447e3b8af4f5f340fd9f62dbff200b2 100644 (file)
@@ -7,7 +7,8 @@
 #include "ModelAPI_CompositeFeature.h"
 
 bool GeomValidators_ConstructionComposite::isValid(const AttributePtr& theAttribute,
-                                              const std::list<std::string>& theArguments) const
+                                                   const std::list<std::string>& theArguments,
+                                                   std::string& theError) const
 {
   bool aValid = false;
   AttributeSelectionPtr aSelectionAttr = std::dynamic_pointer_cast<ModelAPI_AttributeSelection>
@@ -26,7 +27,14 @@ bool GeomValidators_ConstructionComposite::isValid(const AttributePtr& theAttrib
     // It is a GeomAPI_Vertex shape for the point. The shape of the parameter is 
     // GeomAPI_Shape. It is important to use the realization of the isEqual method from
     // GeomAPI_Vertex class
-    aValid = aShapePtr.get() != NULL && aShapePtr->isEqual(aShape);
+    if (aShape.get()) {
+      aValid = aShapePtr.get() != NULL && aShapePtr->isEqual(aShape);
+    }
+    else {
+      // an empty shape is used in attribute selection if the shape of the result is equal to
+      // the selected shape, so according to the upper condifition, the result is true
+      aValid = true;
+    }
   }
   if (!aValid) {
     ResultConstructionPtr aConstr =