From d81ad2b41135d6d7a5451abe7a1ff503bd029c5e Mon Sep 17 00:00:00 2001 From: PASCALE NOYRET Date: Tue, 18 Jan 2022 12:35:58 +0100 Subject: [PATCH] pour prise en compte du statut --- Ihm/I_MCLIST.py | 6 +++++- Ihm/I_MCSIMP.py | 1 + Noyau/N_FACT.py | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Ihm/I_MCLIST.py b/Ihm/I_MCLIST.py index ca0253f6..135aa698 100644 --- a/Ihm/I_MCLIST.py +++ b/Ihm/I_MCLIST.py @@ -73,8 +73,12 @@ class MCList: def getDicoForFancy(self): #print ('MCList getDicoObjetsCompletsPourTree pour ', self) listeDict=[] + facultatif=1 for i in self.data: - listeDict.append(i.getDicoForFancy()) + dico = i.getDicoForFancy() + if facultatif > i.definition.min : dico['statut']='f' + facultatif+=1 + listeDict.append(dico) return listeDict def isOblig(self): diff --git a/Ihm/I_MCSIMP.py b/Ihm/I_MCSIMP.py index eb7c357f..44990649 100644 --- a/Ihm/I_MCSIMP.py +++ b/Ihm/I_MCSIMP.py @@ -95,6 +95,7 @@ class MCSIMP(I_OBJECT.OBJECT): monDico['max']=self.definition.max monDico['min']=self.definition.min monDico['into']=self.definition.into + monDico['statut']=self.definition.statut return monDico diff --git a/Noyau/N_FACT.py b/Noyau/N_FACT.py index c5737a07..367a3727 100644 --- a/Noyau/N_FACT.py +++ b/Noyau/N_FACT.py @@ -84,6 +84,7 @@ class FACT(N_ENTITE.ENTITE): self.max = max if self.max == "**" : self.max=float('inf') if self.min == "**" : self.min=float('-inf') + if self.statut =='o' and self.min==0 : self.min=1 self.entites = args self.position = None self.affecter_parente() -- 2.39.2