MESSAGE ( "## COM " << myNbCommands << ": "<< aCommand->GetString() );
#endif
- _pyID objID = aCommand->GetObject();
+ const _pyID& objID = aCommand->GetObject();
if ( objID.IsEmpty() )
return aCommand;
// Find an object to process theCommand
// SMESH_Gen method?
- if ( objID == this->GetID() || objID == SMESH_2smeshpy::GenName()) {
+ if ( objID == this->GetID() || objID == SMESH_2smeshpy::GenName())
+ {
this->Process( aCommand );
return aCommand;
}
Handle(_pyObject) _pyGen::FindObject( const _pyID& theObjID ) const
{
- std::map< _pyID, Handle(_pyObject) >::const_iterator id_obj = myObjects.find( theObjID );
- return ( id_obj == myObjects.end() ) ? Handle(_pyObject)() : id_obj->second;
+ {
+ map< _pyID, Handle(_pyObject) >::const_iterator id_obj = myObjects.find( theObjID );
+ if ( id_obj != myObjects.end() )
+ return id_obj->second;
+ }
+ {
+ map< _pyID, Handle(_pyMesh) >::const_iterator id_obj = myMeshes.find( theObjID );
+ if ( id_obj != myMeshes.end() )
+ return id_obj->second;
+ }
+ {
+ map< _pyID, Handle(_pyMeshEditor) >::const_iterator id_obj = myMeshEditors.find( theObjID );
+ if ( id_obj != myMeshEditors.end() )
+ return id_obj->second;
+ }
+ return Handle(_pyObject)();
}
//================================================================================