Publishing the result of SurfOpt and Cleaner if the output file exists even if the computation has ended in error

This commit is contained in:
Christophe Bourcier 2019-06-03 17:37:42 +02:00
parent d8e62d4397
commit 9b65ce0c47
2 changed files with 16 additions and 4 deletions

View File

@ -110,8 +110,14 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog):
if exit_code == 0 and not self.anErrorOccured:
self.parent().enregistreResultat()
elif not self.hasBeenCanceled:
QMessageBox.critical(self, 'Computation failed',
'The computation has failed.<br>Please, check the log message.')
if os.path.exists(self.parent().fichierOut):
self.parent().enregistreResultat()
QMessageBox.critical(self, 'Computation ended in error',
'A new mesh has been generated but with some errors.'+
'<br>Please, check the log message.')
else:
QMessageBox.critical(self, 'Computation failed',
'The computation has failed.<br>Please, check the log message.')
pass
def errorOccured(self):

View File

@ -109,8 +109,14 @@ class MonViewText(Ui_ViewExe, QDialog):
if exit_code == 0 and not self.anErrorOccured:
self.parent().enregistreResultat()
elif not self.hasBeenCanceled:
QMessageBox.critical(self, 'Computation failed',
'The computation has failed.<br>Please, check the log message.')
if os.path.exists(self.parent().fichierOut):
self.parent().enregistreResultat()
QMessageBox.critical(self, 'Computation ended in error',
'A new mesh has been generated but with some errors.'+
'<br>Please, check the log message.')
else:
QMessageBox.critical(self, 'Computation failed',
'The computation has failed.<br>Please, check the log message.')
pass
def errorOccured(self):