From 6b8b29b76631bf3babe863885756988c4eedbb8f Mon Sep 17 00:00:00 2001 From: srn Date: Mon, 11 Apr 2005 10:55:12 +0000 Subject: [PATCH] Modified methdo GetObjectPath, to take into account an input argument of type SObject --- src/SALOMEDS/SALOMEDS_Study_i.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index faed4024b..c8ea13db5 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -246,8 +246,16 @@ char* SALOMEDS_Study_i::GetObjectPath(CORBA::Object_ptr theObject) TCollection_AsciiString aPath(""); if(CORBA::is_nil(theObject)) return CORBA::string_dup(aPath.ToCString()); + Handle(SALOMEDSImpl_SObject) aSO; + SALOMEDS::SObject_var aSObj = SALOMEDS::SObject::_narrow(theObject); - Handle(SALOMEDSImpl_SObject) aSO = _impl->FindObjectIOR(_orb->object_to_string(theObject)); + if(!CORBA::is_nil(aSObj)) { + aSO = _impl->FindObjectID(aSObj->GetID()); + } + else { + aSO = _impl->FindObjectIOR(_orb->object_to_string(theObject)); + } + if(aSO.IsNull()) return CORBA::string_dup(aPath.ToCString()); aPath = _impl->GetObjectPath(aSO); -- 2.39.2