Salome HOME
allow SMESH publishing in GUI
authorPaul RASCLE <paul.rascle@openfields.fr>
Wed, 26 Aug 2020 09:37:59 +0000 (11:37 +0200)
committerYOANN AUDOUIN <B61570@dsp0851742.postes.calibre.edf.fr>
Fri, 30 Oct 2020 16:06:22 +0000 (17:06 +0100)
src/HYDROTools/shapesGroups.py

index 1ed9e63b46e9a9a7f53b383ec0ba9bdab63c193a..298b29a04639bd87580c14142c58d7488547689a 100644 (file)
@@ -23,7 +23,8 @@ def freeBordersGroup(meshFileIn, meshFileOut=""):
     return full path of the output mesh file
     """
     smesh = smeshBuilder.New()
-    smesh.SetEnablePublish( False ) # Set to False to avoid publish in study if not needed
+    if not salome.sg.hasDesktop():
+        smesh.SetEnablePublish( False ) # Set to False to avoid publish in study if not needed
     ([MESH], status) = smesh.CreateMeshesFromMED(meshFileIn)
 
     nbAdded, MESH, addedBnd = MESH.MakeBoundaryElements( SMESH.BND_1DFROM2D, '', '', 0, [])