Salome HOME
PAL20544 4x: problems with Concatenate().
authoreap <eap@opencascade.com>
Thu, 23 Oct 2008 06:35:48 +0000 (06:35 +0000)
committereap <eap@opencascade.com>
Thu, 23 Oct 2008 06:35:48 +0000 (06:35 +0000)
  fix SetName(obj, name) for the case if obj is instance of class Mesh
  or Mesh_Algorithm

src/SMESH_SWIG/smeshDC.py

index 88aa2a6f6e226014d4414c214ffa4e2cfffba671..c9d99bf92085da080656857e756d3fbe5b962825 100644 (file)
@@ -174,6 +174,10 @@ def GetName(obj):
 
 ## Sets a name to the object
 def SetName(obj, name):
+    if isinstance( obj, Mesh ):
+        obj = obj.GetMesh()
+    elif isinstance( obj, Mesh_Algorithm ):
+        obj = obj.GetAlgorithm()
     ior  = salome.orb.object_to_string(obj)
     sobj = salome.myStudy.FindObjectIOR(ior)
     if not sobj is None: