mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-04-08 20:47:27 +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):
|
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)
|
||||||
attr = sobj.FindAttribute("AttributeName")[1]
|
if not sobj is None:
|
||||||
attr.SetValue(name)
|
attr = sobj.FindAttribute("AttributeName")[1]
|
||||||
|
attr.SetValue(name)
|
||||||
|
|
||||||
# Algorithms and hypothesis
|
# Algorithms and hypothesis
|
||||||
# =========================
|
# =========================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user