X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=Editeur%2Fcompooper.py;h=154aa2abf98d5a70067e4091ce1c9e930ff2e95c;hb=29b425ec26f919b37df151a0c22b9d13cfa55de8;hp=eceb5cf8b635c05c07cc33bbda02164134bb73f9;hpb=fcd054a825fbe171652108194c0204f8e3fd955a;p=tools%2Feficas.git diff --git a/Editeur/compooper.py b/Editeur/compooper.py index eceb5cf8..154aa2ab 100644 --- a/Editeur/compooper.py +++ b/Editeur/compooper.py @@ -1,12 +1,25 @@ -#@ MODIF compooper Editeur DATE 02/07/2001 AUTEUR D6BHHJP J.P.LEFEBVRE # CONFIGURATION MANAGEMENT OF EDF VERSION # ====================================================================== -# COPYRIGHT (C) 1991 - 2001 EDF R&D WWW.CODE-ASTER.ORG -# SEE THE FILE "LICENSE.TERMS" FOR INFORMATION ON USAGE AND -# REDISTRIBUTION OF THIS FILE. +# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG +# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY +# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY +# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR +# (AT YOUR OPTION) ANY LATER VERSION. +# +# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL, BUT +# WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF +# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU +# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# +# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE +# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, +# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# +# # ====================================================================== from Tkinter import * import Pmw +import traceback import Objecttreeitem import panels import fontes @@ -68,7 +81,8 @@ class OPERPanel(panels.OngletPanel): choix = self.listbox.getcurselection()[0] self.valeur_choisie.set(choix) except: - pass + traceback.print_exc() + def choose_valeur_from_list(self,command): try: @@ -76,7 +90,7 @@ class OPERPanel(panels.OngletPanel): self.valeur_choisie.set(choix) apply(command,(),{}) except: - pass + traceback.print_exc() class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): panel = OPERPanel @@ -189,7 +203,9 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): def nomme_sd(self,nom): """ Lance la méthode de nommage de la SD """ - return self.object.nomme_sd(nom) + test,mess= self.object.nomme_sd(nom) + if test:self.object.parent.reset_context() + return test,mess def is_reentrant(self): return self.object.is_reentrant() @@ -218,6 +234,16 @@ class EtapeTreeItem(Objecttreeitem.ObjectTreeItem): commande_comment.jdc = commande_comment.parent = self.object.jdc return commande_comment + def replace_child(self,old_item,new_item): + """ + Remplace old_item.object par new_item.object dans les fils de self.object + """ + index = self.object.mc_liste.index(old_item.object) + self.object.init_modif() + self.object.mc_liste.remove(old_item.object) + self.object.mc_liste.insert(index,new_item.object) + self.object.fin_modif() + import Accas treeitem = EtapeTreeItem objet = Accas.ETAPE