From 1027b92d3809f900cb23b51472d73869f85f72ad Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Fri, 21 Oct 2016 15:24:14 +0200 Subject: [PATCH] modif du 21 --- InterfaceQT4/monWidgetPlusieursBase.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/InterfaceQT4/monWidgetPlusieursBase.py b/InterfaceQT4/monWidgetPlusieursBase.py index 5565576e..e2162c90 100644 --- a/InterfaceQT4/monWidgetPlusieursBase.py +++ b/InterfaceQT4/monWidgetPlusieursBase.py @@ -209,10 +209,21 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) donneFocus=None derniereValeur=None self.listeValeursCourantes = [] - for i in range (1, self.indexDernierLabel+1): + fin=self.indexDernierLabel + for i in range (1, fin): nomLineEdit="lineEditVal"+str(i) courant=getattr(self,nomLineEdit) valeur=courant.text() + lval=valeur.split(',') + if len (lval) > 1 : + QMessageBox.warning(self,tr('saisie invalide'),tr('Entrer 1 valeur par ligne')) + courant.setText(lval[0]) + break + + for i in range (1, self.indexDernierLabel+1): + nomLineEdit="lineEditVal"+str(i) + courant=getattr(self,nomLineEdit) + ~/PSEN_21_10/Code/InterfaceQT4 if valeur != None and valeur != "" : commentaire=self.ajout1Valeur(valeur) if (commentaire != None ): -- 2.39.2