Fix omniORB::fatalException at SALOME termination after creating a Mesh in Python

do not call mesh.Register() as this prevents mesh servant deletion at closing study
This commit is contained in:
eap 2013-09-19 12:44:24 +00:00
parent 7384d881f7
commit fab1d896c8

View File

@ -1206,7 +1206,7 @@ class Mesh:
## Destructor. Clean-up resources ## Destructor. Clean-up resources
def __del__(self): def __del__(self):
if self.mesh: if self.mesh:
self.mesh.UnRegister() #self.mesh.UnRegister()
pass pass
pass pass
@ -1214,10 +1214,11 @@ class Mesh:
# @param theMesh a SMESH_Mesh object # @param theMesh a SMESH_Mesh object
# @ingroup l2_construct # @ingroup l2_construct
def SetMesh(self, theMesh): def SetMesh(self, theMesh):
if self.mesh: self.mesh.UnRegister() # do not call Register() as this prevents mesh servant deletion at closing study
#if self.mesh: self.mesh.UnRegister()
self.mesh = theMesh self.mesh = theMesh
if self.mesh: if self.mesh:
self.mesh.Register() #self.mesh.Register()
self.geom = self.mesh.GetShapeToMesh() self.geom = self.mesh.GetShapeToMesh()
pass pass