From 1b511503fd8ac86a969fbcc8efc55d0a794aaf72 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Wed, 17 May 2017 13:49:27 +0200 Subject: [PATCH] abort sinon --- InterfaceQT4/gereListe.py | 19 ++++++++++++++----- InterfaceQT4/monWidgetPlusieursBase.py | 2 ++ InterfaceQT4/qtEficas.py | 10 +++++++--- 3 files changed, 23 insertions(+), 8 deletions(-) diff --git a/InterfaceQT4/gereListe.py b/InterfaceQT4/gereListe.py index 65b701cb..5faaf5d9 100644 --- a/InterfaceQT4/gereListe.py +++ b/InterfaceQT4/gereListe.py @@ -69,11 +69,20 @@ class LECustom(QLineEdit): else : self.setStyleSheet("background:rgb(235,235,235)") - if isinstance(self,LECustomTuple) and not self.tupleCustomParent.inFocusOutEvent: - self.tupleCustomParent.inFocusOutEvent=True - self.tupleCustomParent.valueChange() - self.tupleCustomParent.inFocusOutEvent=False - QLineEdit.focusOutEvent(self,event) + + from InterfaceQT4.monWidgetPlusieursBase import MonWidgetPlusieursBase + try : + #if isinstance (self.parentQt, MonWidgetPlusieursBase) and not self.parentQt.inFocusOutEvent : + # self.parentQt.inFocusOutEvent=True + # self.parentQt.changeValeur(changeDePlace=True,oblige=False) + # self.parentQt.inFocusOutEvent=False + + #if isinstance(self,LECustomTuple) and not self.tupleCustomParent.inFocusOutEvent: + # self.tupleCustomParent.inFocusOutEvent=True + # self.tupleCustomParent.valueChange() + # self.tupleCustomParent.inFocusOutEvent=False + QLineEdit.focusOutEvent(self,event) + except : pass def clean(self): self.setText("") diff --git a/InterfaceQT4/monWidgetPlusieursBase.py b/InterfaceQT4/monWidgetPlusieursBase.py index a9fe5511..b45e6a06 100644 --- a/InterfaceQT4/monWidgetPlusieursBase.py +++ b/InterfaceQT4/monWidgetPlusieursBase.py @@ -50,6 +50,7 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) def __init__(self,node,monSimpDef,nom,objSimp,parentQt,commande): #print "MonWidgetPlusieursBase", nom + self.inFocusOutEvent=False self.nomLine="lineEditVal" self.inInit=True self.indexDernierLabel=0 @@ -141,6 +142,7 @@ class MonWidgetPlusieursBase (Ui_WidgetPlusieursBase,Feuille,GereListe,GerePlie) else : nouveauLE.setStyleSheet("background:rgb(235,235,235)") nouveauLE.setFrame(False) nouveauLE.returnPressed.connect(self.changeValeur) + setattr(self,nomLineEdit,nouveauLE) self.listeAffichageWidget.append(nouveauLE) self.etablitOrdre() diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index e7ba8511..ced79316 100755 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -48,7 +48,7 @@ class Appli(Ui_Eficas,QMainWindow): """ Class implementing the main user interface. """ - def __init__(self,code=None,salome=0,parent=None,ssCode=None,multi=False,langue='fr',ssIhm=False): + def __init__(self,code=None,salome=0,parent=None,ssCode=None,multi=False,langue='ang',ssIhm=False): """ Constructor """ @@ -395,8 +395,12 @@ class Appli(Ui_Eficas,QMainWindow): self.menuOptions.setTitle(tr("Options")) def PSEN(self): - if self.first: self.first=0 - self.action_Nouveau.triggered.disconnect(self.fileNew) + if self.first: self.first=0 + try : self.action_Nouveau.triggered.disconnect(self.fileNew) + except : pass + try : self.action_Nouveau.triggered.disconnect(self.newPSEN) + except : pass + self.action_Nouveau.triggered.connect(self.newPSEN) self.enleverActionsStructures() self.enleverParametres() -- 2.39.2