From 86c6825e2a7b3683399eaf39356d910a361240de Mon Sep 17 00:00:00 2001 From: eficas <> Date: Tue, 20 Jul 2004 13:12:23 +0000 Subject: [PATCH] =?utf8?q?PN=20:=20Apr=C3=A8s=20suppression=20d'un=20noeud?= =?utf8?q?,=20s=C3=A9lection=20du=20Noeud=20suivant=20=20=20=20=20=20fiche?= =?utf8?q?=20EO2004-110=20point=20(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Editeur/bureau.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Editeur/bureau.py b/Editeur/bureau.py index 037699cd..817938d6 100644 --- a/Editeur/bureau.py +++ b/Editeur/bureau.py @@ -478,8 +478,20 @@ class BUREAU: if self.JDCDisplay_courant.modified == 'n' : self.JDCDisplay_courant.init_modif() pere = self.JDCDisplay_courant.node_selected.parent - self.JDCDisplay_courant.node_selected.delete() - pere.select() + # Le noeud n'est pas au 1er niveau + if pere.parent.parent != None: + self.JDCDisplay_courant.node_selected.delete() + pere.select() + else: + noeudselecte = self.JDCDisplay_courant.node_selected + parent = noeudselecte.parent + enfants = parent.children + index = enfants.index(noeudselecte) + self.JDCDisplay_courant.node_selected.delete() + try: + enfants[index].select() + except : + enfants[index-1].select() except AttributeError: pass -- 2.39.2