From: Paul RASCLE Date: Mon, 10 Dec 2018 13:59:11 +0000 (+0100) Subject: try icon and toolbar on SMESH plugin MeshCut: OK X-Git-Tag: V9_3_0a1~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ecbeb028a0c74cb1348a734db9d945287cd1740;p=modules%2Fsmesh.git try icon and toolbar on SMESH plugin MeshCut: OK --- diff --git a/resources/CMakeLists.txt b/resources/CMakeLists.txt index 638e99c30..5108b9047 100755 --- a/resources/CMakeLists.txt +++ b/resources/CMakeLists.txt @@ -77,6 +77,7 @@ SET(SMESH_RESOURCES_FILES mesh_octahedron.png mesh_orientation.png mesh.png + mesh_plugins_meshcut.png mesh_polygon.png mesh_polyhedron.png mesh_pyramid_n.png diff --git a/resources/mesh_plugins_meshcut.png b/resources/mesh_plugins_meshcut.png new file mode 100644 index 000000000..59145bff3 Binary files /dev/null and b/resources/mesh_plugins_meshcut.png differ diff --git a/src/Tools/smesh_plugins.py b/src/Tools/smesh_plugins.py index 8393e6a8b..3ee272dd2 100644 --- a/src/Tools/smesh_plugins.py +++ b/src/Tools/smesh_plugins.py @@ -21,6 +21,7 @@ # import salome_pluginsmanager import os +from qtsalome import QIcon try: from spadderPlugin import runSpadderPlugin @@ -33,9 +34,10 @@ except Exception as e: try: from meshcut_plugin import MeshCut + icon_file = os.path.join(os.getenv('SMESH_ROOT_DIR'),'share', 'salome', 'resources', 'smesh', 'mesh_plugins_meshcut.png') salome_pluginsmanager.AddFunction('MeshCut', 'Cut a tetrahedron mesh by a plane', - MeshCut) + MeshCut, icon=QIcon(icon_file)) except Exception as e: salome_pluginsmanager.logger.info('ERROR: MeshCut plug-in is unavailable: {}'.format(e))