X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FYamsPlug%2FmonViewText.py;h=3ae4570308c2cb1bf7b6600da385bf4734a949a8;hb=d9f4b53e489dd5857db264ede6acded7b076c9f1;hp=fe3e665d8f786d054223f62060fdf378ae7b2973;hpb=6d32f944a0a115b6419184c50b57bf7c4eef5786;p=modules%2Fsmesh.git diff --git a/src/Tools/YamsPlug/monViewText.py b/src/Tools/YamsPlug/monViewText.py index fe3e665d8..3ae457030 100644 --- a/src/Tools/YamsPlug/monViewText.py +++ b/src/Tools/YamsPlug/monViewText.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2007-2019 EDF R&D +# Copyright (C) 2007-2022 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -34,11 +34,6 @@ from ViewText_ui import Ui_ViewExe verbose = True -force = os.getenv("FORCE_DISTENE_LICENSE_FILE") -if force != None: - os.environ["DISTENE_LICENSE_FILE"] = force - os.environ["DLIM8VAR"] = "NOTHING" - class MonViewText(Ui_ViewExe, QDialog): """ Classe permettant la visualisation de texte @@ -80,7 +75,7 @@ class MonViewText(Ui_ViewExe, QDialog): def saveFile(self): #recuperation du nom du fichier - savedir=os.environ['HOME'] + savedir=os.path.expanduser("~") fn, mask = QFileDialog.getSaveFileName(None,"Save File",savedir) if not fn: return ulfile = os.path.abspath(str(fn)) @@ -109,8 +104,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):