Salome HOME
Publishing the result of SurfOpt and Cleaner if the output file exists even if the...
authorChristophe Bourcier <christophe.bourcier@cea.fr>
Mon, 3 Jun 2019 15:37:42 +0000 (17:37 +0200)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Mon, 3 Jun 2019 15:37:42 +0000 (17:37 +0200)
src/Tools/MGCleanerPlug/MGCleanerMonViewText.py
src/Tools/YamsPlug/monViewText.py

index fb96f3dbb0acc700857c82e91055e37bc0d8f592..9458af6c216bc919ce923e7c808b57df4959fe49 100644 (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):
index fe3e665d8f786d054223f62060fdf378ae7b2973..cb140d87f4406e2f640361954bde8dfa2160bf5f 100644 (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):