From 9b65ce0c47b0e0e759a9a4232c71eb13f9576b61 Mon Sep 17 00:00:00 2001 From: Christophe Bourcier Date: Mon, 3 Jun 2019 17:37:42 +0200 Subject: [PATCH] Publishing the result of SurfOpt and Cleaner if the output file exists even if the computation has ended in error --- src/Tools/MGCleanerPlug/MGCleanerMonViewText.py | 10 ++++++++-- src/Tools/YamsPlug/monViewText.py | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py index fb96f3dbb..9458af6c2 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py +++ b/src/Tools/MGCleanerPlug/MGCleanerMonViewText.py @@ -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.
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.'+ + '
Please, check the log message.') + else: + QMessageBox.critical(self, 'Computation failed', + 'The computation has failed.
Please, check the log message.') pass def errorOccured(self): diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py index fe3e665d8..cb140d87f 100644 --- a/src/Tools/YamsPlug/monViewText.py +++ b/src/Tools/YamsPlug/monViewText.py @@ -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.
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.'+ + '
Please, check the log message.') + else: + QMessageBox.critical(self, 'Computation failed', + 'The computation has failed.
Please, check the log message.') pass def errorOccured(self): -- 2.39.2