Salome HOME
Merge remote branch 'origin/gdd/translations'
[modules/smesh.git] / src / Tools / padder / spadderpy / gui / inputdialog.py
index c9d8ae618cb9bcca0cbde8a6ce73112be00f5b77..73d629c51bcd29697c576a372e4b55571e006cf9 100644 (file)
@@ -1,10 +1,10 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2012  EDF R&D
+# Copyright (C) 2011-2015  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.
+# 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
@@ -312,8 +312,8 @@ class InputDialog(GenericDialog):
         This function checks if the data are valid, from the dialog
         window point of view.
         """
-        if self.__nbConcreteMesh < 1:
-            self.checkDataMessage = "You must define at least one CONCRETE mesh"
+        if self.__nbConcreteMesh == 0 and self.__nbSteelbarMesh == 0:
+            self.checkDataMessage = "You must define at least one mesh (CONCRETE or STEELBAR)"
             return False        
         if self.__nbConcreteMesh > 1:
             self.checkDataMessage  = "You define multiple CONCRETE meshes."
@@ -321,9 +321,7 @@ class InputDialog(GenericDialog):
             # just warn the user, but don't block
             QMessageBox.information(self, "Info", self.checkDataMessage)
             return True
-        if self.__nbSteelbarMesh < 1:
-            self.checkDataMessage = "You must define at least one STEELBAR mesh"
-            return False
+
         return True