From bf4b751c58629e5f4b4e8841e754f02e17fb327d Mon Sep 17 00:00:00 2001 From: PASCALE NOYRET Date: Wed, 26 Jan 2022 15:55:21 +0100 Subject: [PATCH] bug du propage valide --- InterfaceWeb/browser.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/InterfaceWeb/browser.py b/InterfaceWeb/browser.py index cac57399..07d3c173 100644 --- a/InterfaceWeb/browser.py +++ b/InterfaceWeb/browser.py @@ -52,6 +52,7 @@ class JDCTree(): self.node_selected = self.racine self.inhibeExpand = True self.childrenComplete=[] + self.oldValidite='init' #print ('fin __init__ JDCTree') # def handleContextMenu(self,item,coord): @@ -103,12 +104,16 @@ class JDCNode(): def onValid(self): #----------------- + debug=0 + if self.item.nom == 'MonProc' : debug = 1 + if self.treeParent.oldValidite=='init' : self.treeParent.oldValidite='unknown' validite=self.item.isValid() - #print ('ds onValid', self.item.nom, '_________________________________________________', self.oldValidite, validite) + if debug : print ('ds onValid', self.item.nom, '_________________________________________________', self.oldValidite, validite) if self.oldValidite==validite : return if self.oldValidite=='init' : self.oldValidite=validite - return + if debug : print (self.item.state) + if self.item.state != 'modified' : return self.oldValidite=validite #print ('appel de propageValide pour ', self.item.nom, validite,self.oldValidite) self.editor.connecteur.toWebApp('propageValide',self.getIdUnique(), validite) @@ -119,6 +124,7 @@ class JDCNode(): debug=0 if debug : print ('on add de browser', '________ ajout', ajout, ' dans ', self.item.nom) if debug : print ('nature de l item', self.item.nature) + if self.oldValidite=='init' : self.oldValidite='unknown' self.buildChildren() # si on a un copie multiple --> pas gere correctement @@ -155,6 +161,7 @@ class JDCNode(): def onSupp(self,suppression): #--------------------------- + if self.treeParent.oldValidite=='init' : self.treeParent.oldValidite='unknown' if len(suppression) > 1 : print ('onSupp suppression multiple non valeur') return -- 2.39.2