fix bug 12361. In SetName(): there may be no study

This commit is contained in:
eap 2006-05-10 12:54:55 +00:00
parent fdfe9f0f65
commit d9a6e9d9f3

View File

@ -60,6 +60,7 @@ def GetName(obj):
def SetName(obj, name):
ior = salome.orb.object_to_string(obj)
sobj = salome.myStudy.FindObjectIOR(ior)
if not sobj is None:
attr = sobj.FindAttribute("AttributeName")[1]
attr.SetValue(name)