Salome HOME
Issue #1865: Model Widget for fields
[modules/shaper.git] / src / GeomValidators / GeomValidators_PartitionArguments.cpp
index e94ebca48b78788a4b3c0442be57141118d86b4d..f4482579ff1ee6cb8fccfe8ee40761731667d08c 100644 (file)
@@ -6,13 +6,15 @@
 
 #include <GeomValidators_PartitionArguments.h>
 
+#include <Events_InfoMessage.h>
+
 #include <ModelAPI_AttributeBoolean.h>
 #include <ModelAPI_AttributeSelectionList.h>
 
 //=================================================================================================
 bool GeomValidators_PartitionArguments::isValid(const std::shared_ptr<ModelAPI_Feature>& theFeature,
                                               const std::list<std::string>& theArguments,
-                                              std::string& theError) const
+                                              Events_InfoMessage& theError) const
 {
   if(theArguments.size() != 3) {
     theError = "Wrong number of arguments (expected 3).";
@@ -41,7 +43,8 @@ bool GeomValidators_PartitionArguments::isValid(const std::shared_ptr<ModelAPI_F
     isCombine = anAttrBool->value();
   }
 
-  if((anObjectsNb > 0 && aToolsNb > 0) || (isCombine && anObjectsNb != 0 && (anObjectsNb + aToolsNb > 1))) {
+  if((anObjectsNb > 0 && aToolsNb > 0) ||
+     (isCombine && anObjectsNb != 0 && (anObjectsNb + aToolsNb > 1))) {
     return true;
   }
 
@@ -50,7 +53,8 @@ bool GeomValidators_PartitionArguments::isValid(const std::shared_ptr<ModelAPI_F
 }
 
 //=================================================================================================
-bool GeomValidators_PartitionArguments::isNotObligatory(std::string theFeature, std::string theAttribute)
+bool GeomValidators_PartitionArguments::isNotObligatory(std::string theFeature,
+                                                        std::string theAttribute)
 {
   if(theAttribute == "tool_objects") {
     return true;