# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2012 EDF R&D
+# Copyright (C) 2011-2016 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
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."
# 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