From 41007151af6ea884cc24d533d3b8ac22bf54674e Mon Sep 17 00:00:00 2001 From: asl Date: Thu, 24 Nov 2016 14:11:09 +0300 Subject: [PATCH] refs #1032: do not close the dialog if there is an error message --- src/salome_hydro/interpolz_gui.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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() -- 2.39.2