X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FMGCleanerPlug%2FMGCleanerplug_plugin.py;h=7bc19e021a544d180c7695788c34eecff2ab7548;hb=300e5f1bc562d4d8f9dcc66721dfe0d9a3b873cb;hp=80eeae790cc6bee86ab51aebb50869cbe1b169a3;hpb=02df1b69aa4a8f3bb6b4784cdcf40596dd5cd171;p=modules%2Fsmesh.git diff --git a/src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py b/src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py index 80eeae790..7bc19e021 100644 --- a/src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py +++ b/src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py @@ -1,10 +1,10 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2006-2013 EDF R&D +# Copyright (C) 2013-2021 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 # License as published by the Free Software Foundation; either -# version 2.1 of the License. +# version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,26 +22,16 @@ # if not, copy this file as ${HOME}/Plugins/smesh_plugins.py or ${APPLI}/Plugins/smesh_plugins.py def MGCleanerLct(context): - # get context study, studyId, salomeGui + # get context study, salomeGui study = context.study - studyId = context.studyId sg = context.sg import os import subprocess import tempfile - from PyQt4 import QtCore - from PyQt4 import QtGui - from PyQt4.QtGui import QFileDialog - from PyQt4.QtGui import QMessageBox + from qtsalome import QFileDialog, QMessageBox - #prior test to avoid unnecessary user GUI work with ending crash - try : - os.environ['DISTENE_LICENCE_FILE_FOR_MGCLEANER'] - except: - QMessageBox.warning(None,"Products","Distene's product MeshGem Cleaner is not installed.\nrequired environment variable:\nDISTENE_LICENCE_FILE_FOR_MGCLEANER='/.../dlim8.var.sh'") - return import MGCleanerMonPlugDialog - window=MGCleanerMonPlugDialog.getDialog() + window = MGCleanerMonPlugDialog.getDialog() window.show()