From c2dc77e7c1a0f512a5a0fa1117900df6c3c9dcb1 Mon Sep 17 00:00:00 2001 From: pnoyret Date: Fri, 5 Apr 2013 11:43:24 +0000 Subject: [PATCH] Push double click --- src/Tools/YamsPlug/monViewText.py | 4 ++++ src/Tools/YamsPlug/monYamsPlugDialog.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.2