From: pnoyret Date: Fri, 5 Apr 2013 11:43:24 +0000 (+0000) Subject: Push double click X-Git-Tag: V7_2_0rc1~32 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=c2dc77e7c1a0f512a5a0fa1117900df6c3c9dcb1 Push double click --- diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py index 3540d5545..a613f5d6b 100644 --- a/src/Tools/YamsPlug/monViewText.py +++ b/src/Tools/YamsPlug/monViewText.py @@ -37,6 +37,7 @@ class MonViewText(Ui_ViewExe,QDialog): """ def __init__(self,parent,txt): QDialog.__init__(self,parent) + self.pere=parent self.setupUi(self) self.resize( QSize(600,600).expandedTo(self.minimumSizeHint()) ) self.connect( self.PB_Ok,SIGNAL("clicked()"), self, SLOT("close()") ) @@ -46,6 +47,7 @@ class MonViewText(Ui_ViewExe,QDialog): self.connect(self.monExe, SIGNAL("readyReadStandardOutput()"), self.readFromStdOut ) self.connect(self.monExe, SIGNAL("readyReadStandardError()"), self.readFromStdErr ) + self.connect(self.monExe, SIGNAL("finished(int )"), self.exeFinished ) # Je n arrive pas a utiliser le setEnvironment du QProcess # fonctionne hors Salome mais pas dans Salome ??? @@ -62,6 +64,8 @@ class MonViewText(Ui_ViewExe,QDialog): self.monExe.closeWriteChannel() self.show() + def exeFinished(self): + self.pere.enregistreResultat() def saveFile(self): #recuperation du nom du fichier diff --git a/src/Tools/YamsPlug/monYamsPlugDialog.py b/src/Tools/YamsPlug/monYamsPlugDialog.py index 073526681..1e9c32fc9 100644 --- a/src/Tools/YamsPlug/monYamsPlugDialog.py +++ b/src/Tools/YamsPlug/monYamsPlugDialog.py @@ -72,9 +72,9 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget): if not(self.PrepareLigneCommande()) : return self.PBSavePressed(NomHypo=True) maFenetre=MonViewText(self,self.commande) - if os.path.isfile(self.fichierOut) :self.enregistreResultat() def enregistreResultat(self): + if not(os.path.isfile(self.fichierOut)) : return import smesh import SMESH import salome