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