From: Pascale Noyret Date: Tue, 13 Jul 2010 14:50:29 +0000 (+0000) Subject: pb d accent X-Git-Tag: V2_0~15 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bc5d663aea3d2a12f1822c6a75a4a0051d6d82a5;p=modules%2Feficas.git pb d accent + modif pour validateur VerifExiste --- diff --git a/InterfaceQT4/browser.py b/InterfaceQT4/browser.py index 378336e0..2f2d3d5c 100644 --- a/InterfaceQT4/browser.py +++ b/InterfaceQT4/browser.py @@ -120,6 +120,7 @@ class JDCNode(QTreeWidgetItem): self.item.connect("valid",self.onValid,()) self.item.connect("supp" ,self.onSupp,()) self.item.connect("add" ,self.onAdd,()) + self.state="" def build_children(self,posInsertion=10000): @@ -306,23 +307,24 @@ class JDCNode(QTreeWidgetItem): # # #------------------------------------------------------------------ def onValid(self): + #print "onValid ", self, " ", self.item.nom if self.item.nom == "VARIABLE" and self.item.isvalid(): self.item.jdc.recalcule_etat_correlation() + if hasattr(self.item,'forceRecalcul'): + self.forceRecalculChildren(self.item.forceRecalcul) self.editor.init_modif() self.update_node_valid() self.update_node_label() self.update_node_texte() def onAdd(self,object): - #import traceback - #print traceback.print_stack() self.editor.init_modif() self.update_nodes() def onSupp(self,object): + #print "onSupp" self.editor.init_modif() self.update_nodes() - def update_node_valid(self): """Cette methode remet a jour la validite du noeud (icone) @@ -367,6 +369,18 @@ class JDCNode(QTreeWidgetItem): if self.isExpanded() : for child in self.children: if child.isHidden() == false : child.update_texte() + + + def forceRecalculChildren(self,niveau): + if self.state=='recalcule' : + self.state="" + return + self.state='recalcule' + if hasattr(self.item,'object'): + self.item.object.state="modified" + for child in self.children: + if niveau > 0 : child.forceRecalculChildren(niveau - 1) + def doPaste(self,node_selected): diff --git a/InterfaceQT4/compomclist.py b/InterfaceQT4/compomclist.py index dbc71ca0..0db1cf88 100644 --- a/InterfaceQT4/compomclist.py +++ b/InterfaceQT4/compomclist.py @@ -190,7 +190,7 @@ class MCListTreeItem(Objecttreeitem.SequenceTreeItem,compofact.FACTTreeItem): if self.object.suppentite(obj): if len(self._object) == 1: self.updateDelegate() - message = "Mot-clef " + obj.nom + " supprimé" + message = "Mot-clef " + obj.nom + " supprime" self.appli.affiche_infos(message) return 1 else: diff --git a/InterfaceQT4/compooper.py b/InterfaceQT4/compooper.py index a686922b..a32274d8 100644 --- a/InterfaceQT4/compooper.py +++ b/InterfaceQT4/compooper.py @@ -161,7 +161,7 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): self.appli.affiche_infos('Impossible de supprimer un mot-clé obligatoire ',Qt.red) return 0 if self.object.suppentite(itemobject): - message = "Mot-clé " + itemobject.nom + " supprimé" + message = "Mot-clef " + itemobject.nom + " supprime" self.appli.affiche_infos(message) return 1 else : diff --git a/InterfaceQT4/monPlusieursIntoPanel.py b/InterfaceQT4/monPlusieursIntoPanel.py index 1df0457d..55dab333 100644 --- a/InterfaceQT4/monPlusieursIntoPanel.py +++ b/InterfaceQT4/monPlusieursIntoPanel.py @@ -81,6 +81,10 @@ class MonPlusieursIntoPanel(DPlusInto,QTPanel,SaisieValeur): if self.listeValeursCourantes == [] : self.editor.affiche_infos("Pas de validation d un groupe vide",Qt.red) return + if hasattr(self.node.item.definition.validators,'verifie_liste'): + if self.node.item.definition.validators.verifie_liste(self.listeValeursCourantes) == 0 : + self.editor.affiche_infos("les valeurs ne sont pas correctes",Qt.red) + return self.node.item.set_valeur(self.listeValeursCourantes) self.editor.affiche_infos("Valeur Acceptée") diff --git a/InterfaceQT4/qtSaisie.py b/InterfaceQT4/qtSaisie.py index 7b8c6894..a01012ae 100644 --- a/InterfaceQT4/qtSaisie.py +++ b/InterfaceQT4/qtSaisie.py @@ -65,6 +65,7 @@ class SaisieValeur: self.listBoxVal.clear() if hasattr(self.node.item.definition.validators,'set_liste'): self.node.item.definition.validators.set_liste(self.node.item) + if self.node.item.isvalid() == 0 : listeDejaLa=[] lChoix=self.node.item.get_liste_possible(listeDejaLa) for valeur in lChoix : self.listBoxVal.addItem( str(valeur) )