mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-09 21:57:27 +05:00
fix bug 12361. In SetName(): there may be no study
This commit is contained in:
parent
fdfe9f0f65
commit
d9a6e9d9f3
@ -60,6 +60,7 @@ def GetName(obj):
|
|||||||
def SetName(obj, name):
|
def SetName(obj, name):
|
||||||
ior = salome.orb.object_to_string(obj)
|
ior = salome.orb.object_to_string(obj)
|
||||||
sobj = salome.myStudy.FindObjectIOR(ior)
|
sobj = salome.myStudy.FindObjectIOR(ior)
|
||||||
|
if not sobj is None:
|
||||||
attr = sobj.FindAttribute("AttributeName")[1]
|
attr = sobj.FindAttribute("AttributeName")[1]
|
||||||
attr.SetValue(name)
|
attr.SetValue(name)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user