From: Renaud Barate Date: Mon, 7 Dec 2009 09:18:23 +0000 (+0000) Subject: Moved message box for invalid parameters in structural elements from PAL to EFICAS X-Git-Tag: V5_1_3_beta1~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e789eff212ecca70caf37010737cddc13fa2afe9;p=modules%2Feficas.git Moved message box for invalid parameters in structural elements from PAL to EFICAS --- diff --git a/src/EFICASGUI/eficasSalome.py b/src/EFICASGUI/eficasSalome.py index 45b2726d..9ee8627f 100644 --- a/src/EFICASGUI/eficasSalome.py +++ b/src/EFICASGUI/eficasSalome.py @@ -22,12 +22,11 @@ import Editeur from InterfaceQT4 import qtEficas import salome -#import visuDriver import SalomePyQt from pal.studyedit import getStudyEditor -from pal.structelem import StructuralElementManager +from pal.structelem import StructuralElementManager, InvalidParameterError # couleur pour visualisation des geometries @@ -513,16 +512,22 @@ class MyEficas( qtEficas.Appli ): atLeastOneStudy = self.editor.study if not atLeastOneStudy: return - logger.debug(10*'#'+":envoievisu: creating a visuDriver instance") - structElemManager = StructuralElementManager(self.editor.studyId, self) + logger.debug(10*'#'+":envoievisu: creating a StructuralElementManager instance") + structElemManager = StructuralElementManager() elem = structElemManager.createElement(liste_commandes) elem.display() salome.sg.updateObjBrowser(True) + except InvalidParameterError, err: + from PyQt4.QtGui import QMessageBox + trStr = self.tr("Invalid parameter for group %(group)s: %(expr)s must be " + "greater than %(minval)g (actual value is %(value)g)") + msg = str(trStr) % {"group": err.groupName, "expr": err.expression, + "minval": err.minValue, "value": err.value} + QMessageBox.warning(self, self.tr("Error"), msg) except: traceback.print_exc() logger.debug(10*'#'+":pb dans envoievisu") - #------------------------------------------------------------------------------------------------------- # Point d'entree lancement EFICAS