Salome HOME
Define Rename as an operation
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ExternalValidator.cpp
index 7b85871883d0e3a4cf2bcf4dcf3a0c9ea63e5401..362dd94f17ab09068ada469ed648c244b79ec54f 100644 (file)
@@ -13,7 +13,8 @@
 #include <ModelAPI_AttributeRefAttr.h>
 
 bool SketchPlugin_ExternalValidator::isValid(const AttributePtr& theAttribute,
-                                          const std::list<std::string>& theArguments) const
+                                             const std::list<std::string>& theArguments,
+                                             std::string& theError) const
 {
   if (theArguments.size() != 1)
     return true;
@@ -27,8 +28,10 @@ bool SketchPlugin_ExternalValidator::isValid(const AttributePtr& theAttribute,
   bool isParameterExternal = isExternalAttribute(aFeature->attribute(aFrontArgument));
 
   // it is not possible that both features, attribute and attribute in parameter, are external
-  if (isAttributeExternal && isParameterExternal)
+  if (isAttributeExternal && isParameterExternal) {
+    theError = "Both features, attribute and attribute in parameter, are external.";
     return false;
+  }
   return true;
 }