From: Eric F Date: Mon, 11 Oct 2021 16:43:49 +0000 (+0200) Subject: OrderedDico -> Dico X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=5bf3615c1bba9ea8ffb049b8ebb3651d6cad37a2;p=tools%2Feficas.git OrderedDico -> Dico --- diff --git a/Ihm/I_MCSIMP.py b/Ihm/I_MCSIMP.py index 8dcf2b92..f2063b34 100644 --- a/Ihm/I_MCSIMP.py +++ b/Ihm/I_MCSIMP.py @@ -70,7 +70,8 @@ class MCSIMP(I_OBJECT.OBJECT): def getDicoObjetsCompletsPourTree(self): monDico={} - leTexte="" + self.nom + ' ' + str(self.val) + "" + # leTexte="" + self.nom + ' ' + str(self.val) + "" + leTexte= self.nom + " " + str(self.val) monDico['text']=leTexte return monDico diff --git a/Ihm/I_OBJECT.py b/Ihm/I_OBJECT.py index 1ce1ccf2..cf0f6bc9 100644 --- a/Ihm/I_OBJECT.py +++ b/Ihm/I_OBJECT.py @@ -190,11 +190,13 @@ class OBJECT: def getDicoObjetsCompletsPourTree(self): from collections import OrderedDict - monDico=OrderedDict() - leTexte="" + self.nom +"" + # monDico=OrderedDict() + monDico={} +# leTexte="" + self.nom +"" + leTexte=self.nom monDico['text']=leTexte listeNodes=[] - for obj in (self.mcListe): + for obj in self.mcListe: listeNodes.append(obj.getDicoObjetsCompletsPourTree()) monDico['nodes']=listeNodes return monDico diff --git a/InterfaceWeb/compojdc.py b/InterfaceWeb/compojdc.py index 7493a968..5bab4481 100644 --- a/InterfaceWeb/compojdc.py +++ b/InterfaceWeb/compojdc.py @@ -138,14 +138,17 @@ class JDCTreeItem(Objecttreeitem.ObjectTreeItem): def getDicoObjetsCompletsPourTree(self): from collections import OrderedDict - monDico=OrderedDict() + # monDico=OrderedDict() + monDico={} + monDico['text']="Racine à Programmer" + listNodes=[] for e in self.object.etapes : - sdNom = '' - if e.nature == 'OPERATEUR' and e.sdnom != "sansnom" : sdNom = e.sdnom - leTexte="" + e.nom + sdNom + "" - monDico['text']=leTexte - - monDico['nodes']=e.getDicoObjetsCompletsPourTree() + # sdNom = '' + # if e.nature == 'OPERATEUR' and e.sdnom != "sansnom" : sdNom = e.sdnom + # # leTexte="" + e.nom + sdNom + "" + # leTexte=e.nom + sdNom + listNodes.append(e.getDicoObjetsCompletsPourTree()) + monDico['nodes']=listNodes return monDico