From: pascale.noyret Date: Thu, 14 Jun 2018 14:10:30 +0000 (+0200) Subject: pb si ASSD et grma X-Git-Tag: avantMenage~80 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fb316e3add3c320161dcc26e01f3ad13178b8062;p=tools%2Feficas.git pb si ASSD et grma --- diff --git a/InterfaceQT4/composimp.py b/InterfaceQT4/composimp.py index 8fb3cf33..c9a3ef1d 100644 --- a/InterfaceQT4/composimp.py +++ b/InterfaceQT4/composimp.py @@ -179,7 +179,14 @@ class Node(browser.JDCNode,typeNode.PopUpMenuNodeMinimal): widget=MonWidgetPlusieursInto(self,maDefinition,monNom,monObjet,parentQt,maCommande) elif self.item.waitAssd() : listeAAfficher = self.item.getSdAvantDuBonType() - if len(listeAAfficher) == 0: + mctype=maDefinition.type[0] + enable_salome_selection = self.editor.salome and \ + (('grma' in repr(mctype)) or ('grno' in repr(mctype)) or ('SalomeEntry' in repr(mctype)) or \ + (hasattr(mctype, "enable_salome_selection") and mctype.enable_salome_selection)) + if enable_salome_selection: + from InterfaceQT4.monWidgetPlusieursBase import MonWidgetPlusieursBase + widget=MonWidgetPlusieursBase(self,maDefinition,monNom,monObjet,parentQt,maCommande) + elif len(listeAAfficher) == 0: from InterfaceQT4.monWidgetVide import MonWidgetVide widget = MonWidgetVide(self,maDefinition,monNom,monObjet,parentQt,maCommande) elif self.item in self.editor.listeDesListesOuvertes or not(self.editor.afficheListesPliees) : diff --git a/InterfaceQT4/monWidgetPlusieursBase.py b/InterfaceQT4/monWidgetPlusieursBase.py index a039eaf4..45c7a46c 100644 --- a/InterfaceQT4/monWidgetPlusieursBase.py +++ b/InterfaceQT4/monWidgetPlusieursBase.py @@ -213,9 +213,10 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) validite,comm,comm2,listeRetour= self.politique.ajoutNTuple(listeComplete) if not validite : - self.editor.affiche_infos(texte,Qt.red) + self.editor.afficheInfos(comm2,Qt.red) return + # on calcule le dernier lineedit rempli avant de changer la valeur if self.objSimp.valeur != None : indexDernierRempli=len(self.objSimp.valeur) else : indexDernierRempli=0 diff --git a/InterfaceQT4/monWidgetVide.py b/InterfaceQT4/monWidgetVide.py index 55949ebe..1fb2e720 100644 --- a/InterfaceQT4/monWidgetVide.py +++ b/InterfaceQT4/monWidgetVide.py @@ -24,16 +24,16 @@ import types,os # Modules Eficas from Extensions.i18n import tr -from .feuille import Feuille -from desWidgetVide import Ui_WidgetVide - - +from .feuille import Feuille +from desWidgetVide import Ui_WidgetVide +from InterfaceQT4.politiquesValidation import PolitiqueUnique class MonWidgetVide (Ui_WidgetVide,Feuille): def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande): Feuille.__init__(self,node,monSimpDef,nom,objSimp,parentQt,commande) + self.politique=PolitiqueUnique(self.node,self.editor) t=self.node.item.object.definition.type[0].__name__ self.lineEditVal.setText('Attend un objet de type '+t+'. Il faut en créer') self.parentQt.commandesLayout.insertWidget(-1,self)