X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=inline;f=src%2FSTLPlugin%2FSTLPlugin_OperationsCreator.cxx;h=401dbff865af69498bd2946b3481ec8593783953;hb=c4999d16551e5ac1eae8329faf1ab65cf023a844;hp=fcfa4abf5b3884896487ab751cb080355599a05d;hpb=ec168c32f86cab8199030ec4e8e2b1cbd5e42670;p=modules%2Fgeom.git diff --git a/src/STLPlugin/STLPlugin_OperationsCreator.cxx b/src/STLPlugin/STLPlugin_OperationsCreator.cxx index fcfa4abf5..401dbff86 100644 --- a/src/STLPlugin/STLPlugin_OperationsCreator.cxx +++ b/src/STLPlugin/STLPlugin_OperationsCreator.cxx @@ -32,7 +32,7 @@ // OCCT includes #include -std::map STLPlugin_OperationsCreator::_mapOfOperations; +STLPlugin_IOperations* STLPlugin_OperationsCreator::_operation; STLPlugin_OperationsCreator::STLPlugin_OperationsCreator() { @@ -53,19 +53,17 @@ STLPlugin_OperationsCreator::~STLPlugin_OperationsCreator() } GEOM_IOperations_i* STLPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA, - int theStudyId, GEOM::GEOM_Gen_ptr theEngine, ::GEOMImpl_Gen* theGenImpl ) { Unexpect aCatch( SALOME_SalomeException ); MESSAGE( "STLPlugin_OperationsCreator::Create" ); - return new STLPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) ); + return new STLPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) ); } -STLPlugin_IOperations* STLPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl, - int theStudyId ) +STLPlugin_IOperations* STLPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl ) { - if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() ) - _mapOfOperations[theStudyId] = new STLPlugin_IOperations( theGenImpl, theStudyId ); - return _mapOfOperations[theStudyId]; + if( !_operation ) + _operation = new STLPlugin_IOperations( theGenImpl ); + return _operation; }