Salome HOME
Issue #2602: Check selection with validators before its using.
[modules/shaper.git] / src / GeomValidators / GeomValidators_PartitionArguments.cpp
index 9d017b017e3857fb9a285735af85bf8bc115580b..0231edafa98a23bf2b7039e65a492e04f2e15070 100644 (file)
@@ -1,8 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:        GeomValidators_PartitionArguments.cpp
-// Created:     17 September 2015
-// Author:      Dmitry Bobylev
+// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #include <GeomValidators_PartitionArguments.h>
 
@@ -43,7 +57,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;
   }
 
@@ -52,7 +67,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;