]> SALOME platform Git repositories - modules/hydrosolver.git/commitdiff
Salome HOME
refs #1032: do not close the dialog if there is an error message
authorasl <asl@opencascade.com>
Thu, 24 Nov 2016 11:11:09 +0000 (14:11 +0300)
committerasl <asl@opencascade.com>
Thu, 24 Nov 2016 11:11:09 +0000 (14:11 +0300)
src/salome_hydro/interpolz_gui.py

index 16998413f874176c8740292707c847798928541b..c15d84d672a6cc053c65c8c7b404b7d84515f606 100644 (file)
@@ -124,8 +124,8 @@ class InterpolzDlg( QtGui.QDialog ):
         self.Groups.setCellWidget( i, 1, cb )
 
     def onApplyClose( self ):
-        self.onApply()
-        self.onClose()
+        if self.onApply():
+            self.onClose()
         
     def onApply( self ):
         path = str(self.OutputPath.text())
@@ -152,11 +152,14 @@ class InterpolzDlg( QtGui.QDialog ):
         elif len(interp)==0:
             msg = "Please choose interpolation method"
         
+        result = False
         if len(msg)==0:
             generate( path, calc_case, med_file, med_groups_regions, z_undef, interp )
             msg = "InterpolZ script is successfully generated"
+            result = True
             
         QtGui.QMessageBox.information( self, "", msg )
+        return result
         
     def onClose( self ):
         self.close()