From b6094a0992247b5b78d3b86c1a3951197f6c31cf Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Mon, 14 Nov 2016 14:38:16 +0100 Subject: [PATCH] monWidgetCommande.py --- InterfaceQT4/monWidgetCommande.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/InterfaceQT4/monWidgetCommande.py b/InterfaceQT4/monWidgetCommande.py index a78385d6..0cb3b8ee 100644 --- a/InterfaceQT4/monWidgetCommande.py +++ b/InterfaceQT4/monWidgetCommande.py @@ -58,10 +58,12 @@ class MonWidgetCommande(Ui_WidgetCommande,Groupe): self.labelDoc.close() self.frameAffichage.resize(self.frameAffichage.width(),50) - if (etape.get_type_produit()==None): self.LENom.close() - elif (hasattr(etape, 'sdnom')) and etape.sdnom != "sansnom" and etape.sdnom != None: self.LENom.setText(etape.sdnom) + #if (etape.get_type_produit()==None): self.LENom.close() + if not(hasattr(etape.definition,'sd_prod')) or (etape.definition.sd_prod==None): self.LENom.close() + elif (hasattr(etape, 'sdnom')) and etape.sdnom != "sansnom" and etape.sdnom != None: self.LENom.setText(etape.sdnom) else : self.LENom.setText("") + maPolice= QFont("Times", 10,) self.setFont(maPolice) self.labelNomCommande.setText(tr(self.obj.nom)) @@ -285,6 +287,8 @@ class MonWidgetCommande(Ui_WidgetCommande,Groupe): icon=QIcon(self.repIcon+"/ast-red-ball.png") if self.node.item.GetIconName() == "ast-yellow-square" : icon=QIcon(self.repIcon+"/ast-yel-ball.png") + self.LENom.setDisabled(False) + if self.node.item.GetIconName() == "ast-red-square" : self.LENom.setDisabled(True) self.RBValide.setIcon(icon) -- 2.39.2