X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=InterfaceQT4%2FmonChoixCommande.py;h=fb803fd8379a4f2aa77c7c67a8936cf0609dcb28;hb=e570dff249a11579eb7d33de376ed71be16d7261;hp=6dd35550d967f850437c7db23536c5a9a3ae5cf7;hpb=8da5de6cb594bf9b703b723ace2514f644d866b8;p=tools%2Feficas.git diff --git a/InterfaceQT4/monChoixCommande.py b/InterfaceQT4/monChoixCommande.py index 6dd35550..fb803fd8 100644 --- a/InterfaceQT4/monChoixCommande.py +++ b/InterfaceQT4/monChoixCommande.py @@ -60,6 +60,7 @@ class MonChoixCommande(Ui_ChoixCommandes,QtGui.QWidget): self.name=None self.AjouteRadioButton() self.connect(self.LEFiltre,SIGNAL("returnPressed()"),self.AjouteRadioButton) + if self.editor.affiche_alpha==0 : self.afficheGroupe() def afficheAlpha(self): self.affiche_alpha=1 @@ -79,12 +80,19 @@ class MonChoixCommande(Ui_ChoixCommandes,QtGui.QWidget): nodeCourrant=self.node.tree.currentItem() if nodeCourrant==None: nodeCourrant=self.node.tree.racine if self.name != None : - if nodeCourrant==self.node : nouveau=self.node.append_child(self.name,'first') - else : nouveau=nodeCourrant.append_brother(self.name) - print "je suis la" - from InterfaceQT4 import compojdc - if self.editor.afficheCommandesPliees==True and isinstance(nouveau.treeParent,compojdc.Node) : - nouveau.plieToutEtReaffiche() + plier=self.editor.afficheCommandesPliees + if nodeCourrant==self.node : nouveau=self.node.append_child(self.name,'first',plier) + else : nouveau=nodeCourrant.append_brother(self.name,plier=plier) + nouveau.setDeplie() + #if self.editor.afficheApresInsert==True : nouveau.plieToutEtReaffiche() + if self.editor.afficheApresInsert == True : + #if self.editor.affichePlie==True: nouveau.plieToutEtReaffiche() + if self.editor.afficheCommandesPliees ==True: nouveau.plieToutEtReaffiche() + else : nouveau.deplieToutEtReaffiche() + nouveau.fenetre.donnePremier() + #nouveau.deplieToutEtReaffiche() + event.accept() + def CreeListeCommande(self,filtre): listeGroupes,dictGroupes=self.jdc.get_groups() @@ -161,13 +169,6 @@ class MonChoixCommande(Ui_ChoixCommandes,QtGui.QWidget): commentaire="" self.editor.labelCommentaire.setText(commentaire) - def bOkPressed(self): - if self.name==None : - QMessageBox.critical(None, tr("Commande non choisie "), - tr("Vous devez choisir une commande") ) - return - #new_node = self.node.append_child(self.name,'first') - self.node.tree.choisitPremier(self.name) def setValide(self):