Salome HOME
PSEN
[tools/eficas.git] / InterfaceQT4 / monChoixCommande.py
index ce8b84e6bc89d6a379d841cb0d5544026fe15d6a..a6ac039f7a473a9501e55247628bb4c1466d3d58 100644 (file)
@@ -55,7 +55,9 @@ class MonChoixCommande(Ui_ChoixCommandes,QtGui.QWidget):
       self.connect(self.RBGroupe,SIGNAL("clicked()"),self.afficheGroupe)
       self.connect(self.RBOrdre,SIGNAL("clicked()"),self.afficheOrdre)
 
+      if self.editor.Ordre_Des_Commandes == None : self.RBOrdre.close()
 
+       
       self.editor.labelCommentaire.setText("")
       self.name=None
       self.connect(self.LEFiltre,SIGNAL("returnPressed()"),self.AjouteRadioButton)
@@ -101,6 +103,7 @@ class MonChoixCommande(Ui_ChoixCommandes,QtGui.QWidget):
          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)
+      if nouveau == 0 : return # on n a pas insere le noeud
       nouveau.setDeplie()
       #if self.editor.afficheApresInsert==True : nouveau.plieToutEtReaffiche()
       if self.editor.afficheApresInsert == True :
@@ -110,7 +113,6 @@ class MonChoixCommande(Ui_ChoixCommandes,QtGui.QWidget):
            nouveau.fenetre.donnePremier()
            #nouveau.deplieToutEtReaffiche()
       else :
-           print "je passe la"
            self.node.setSelected(False)
            nouveau.setSelected(True)
            self.node.tree.setCurrentItem(nouveau)