X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Gen_i.hxx;fp=src%2FSMESH_I%2FSMESH_Gen_i.hxx;h=fb00207992e089fa874fbee79ef6eaa0cbfb2b2e;hb=da7d0ab212740fa475fdf77333aa20f9c547edac;hp=1a43e4b3e27fa18da6fe06a1c9e48344632931d0;hpb=f3f5a55bf7473cb1e012f1e54004b5561c05464c;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_Gen_i.hxx b/src/SMESH_I/SMESH_Gen_i.hxx index 1a43e4b3e..fb0020799 100644 --- a/src/SMESH_I/SMESH_Gen_i.hxx +++ b/src/SMESH_I/SMESH_Gen_i.hxx @@ -102,7 +102,11 @@ public: } // maps old object id to the new one (used when restoring data) void mapOldToNew( const int oldId, const int newId ) { - mapIdToId[ oldId ] = newId; + if ( mapIdToIOR.find( newId ) != mapIdToIOR.end() ) { + mapIdToIOR[ oldId ] = mapIdToIOR[ newId ]; + mapIdToIOR.erase( newId ); + } + mapIdToId[ oldId ] = oldId; } // get old id by a new one int getOldId( const int newId ) { @@ -476,7 +480,10 @@ public: static void SetPixMap(SALOMEDS::SObject_ptr theSObject, const char* thePixMap); - // Get study context + // Get study context + StudyContext* GetStudyContext( int theStudyId ); + + // Get current study context StudyContext* GetCurrentStudyContext(); // Register an object in a StudyContext; return object id @@ -508,6 +515,8 @@ public: SALOMEDS::Study_ptr GetStudy(CORBA::Long theStudyID); SALOME::Notebook_ptr GetNotebook(CORBA::Long theStudyID); + virtual SALOME::GenericObj_ptr FindObjectByInternalEntry( CORBA::Long theStudyID, const char* theEntry ); + private: // Create hypothesis of given type SMESH::SMESH_Hypothesis_ptr createHypothesis( const char* theHypName,