From: admin Date: Thu, 7 Dec 2006 14:04:37 +0000 (+0000) Subject: This commit was generated by cvs2git to create tag 'V3_2_4pre1'. X-Git-Tag: V3_2_4pre1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d40d830c86fe766c87ae654d342694146ae93581;p=modules%2Fsmesh.git This commit was generated by cvs2git to create tag 'V3_2_4pre1'. Sprout from V3_2_0_maintainance 2006-12-07 08:34:23 UTC eap 'PAL13473 (Build repetitive mesh):' Cherrypick from V3_2_0_maintainance 2006-12-07 14:04:36 UTC maintenance team 'fix compilation on DebianSarge and RedHat': src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx --- diff --git a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx index e0c6cf669..994f39594 100644 --- a/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx +++ b/src/StdMeshers_I/StdMeshers_ObjRefUlils.hxx @@ -98,9 +98,14 @@ public: typename TInterface::_var_type LoadObjectFromStream( std::istream & stream ) { if (SMESH_Gen_i* gen = SMESH_Gen_i::GetSMESHGen()) { - string str; - if (stream >> str) - return gen->GetObjectByOldId< TInterface >( atoi( str.c_str() )); + std::string str; + if (stream >> str) { + if ( StudyContext* myStudyContext = gen->GetCurrentStudyContext() ) { + string ior = myStudyContext->getIORbyOldId( atoi( str.c_str() )); + if ( !ior.empty() ) + return TInterface::_narrow(gen->GetORB()->string_to_object( ior.c_str() )); + } + } } return TInterface::_nil(); }