From: asl Date: Thu, 24 Nov 2016 11:11:09 +0000 (+0300) Subject: refs #1032: do not close the dialog if there is an error message X-Git-Tag: v1.6~2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=41007151af6ea884cc24d533d3b8ac22bf54674e;p=modules%2Fhydrosolver.git refs #1032: do not close the dialog if there is an error message --- diff --git a/src/salome_hydro/interpolz_gui.py b/src/salome_hydro/interpolz_gui.py index 1699841..c15d84d 100644 --- a/src/salome_hydro/interpolz_gui.py +++ b/src/salome_hydro/interpolz_gui.py @@ -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()