From ac90a5e4c8704774aa03ab7add443e97a43d55a7 Mon Sep 17 00:00:00 2001 From: Paul RASCLE Date: Fri, 8 Nov 2019 10:12:40 +0100 Subject: [PATCH] fix dialogues assignStrickler et generate Interpolz --- src/salome_hydro/assignStrickler_gui.py | 6 ++++-- src/salome_hydro/interpolz_gui.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/salome_hydro/assignStrickler_gui.py b/src/salome_hydro/assignStrickler_gui.py index 82a31e2..dd4f093 100644 --- a/src/salome_hydro/assignStrickler_gui.py +++ b/src/salome_hydro/assignStrickler_gui.py @@ -60,9 +60,11 @@ class assignStricklerDlg( QDialog ): def onOutputFile( self ): caption = "Python file" mask = "*.py" - fname, filt = QFileDialog.getSaveFileName( self, caption, ".", mask ) + theDir="." + fname, filt = QFileDialog.getSaveFileName( self, caption, theDir, mask ) + #print("fname: %s"%fname) if fname!=None and fname!="": - if string.split(fname, '.')[-1] != 'py': + if fname.split('.')[-1] != 'py': fname += '.py' self.OutputPath.setText( fname ) diff --git a/src/salome_hydro/interpolz_gui.py b/src/salome_hydro/interpolz_gui.py index 742b291..a1021c6 100644 --- a/src/salome_hydro/interpolz_gui.py +++ b/src/salome_hydro/interpolz_gui.py @@ -137,7 +137,7 @@ class InterpolzDlg( QDialog ): mask = "*.py" fname, filt = QFileDialog.getSaveFileName( self, caption, ".", mask ) if fname!=None and fname!="": - if string.split(fname, '.')[-1] != 'py': + if fname.split('.')[-1] != 'py': fname += '.py' self.OutputPath.setText( fname ) -- 2.39.2