mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-25 17:00:35 +05:00
BugID 9168, Changed the way of creation of GEOM_Engine, no it's stored in satatic varibale, which is initialized only once
This commit is contained in:
parent
2c7236aa9e
commit
957bbeb9e8
@ -118,8 +118,11 @@ bool GEOM_SelectionFilter::getShape (const GEOM::GEOM_Object_ptr& theObject,
|
||||
if ( app )
|
||||
{
|
||||
SALOME_LifeCycleCORBA* ls = new SALOME_LifeCycleCORBA( app->namingService() );
|
||||
static GEOM::GEOM_Gen_var geomGen;
|
||||
if(CORBA::is_nil( geomGen )) {
|
||||
Engines::Component_var comp = ls->FindOrLoad_Component( "FactoryServer", "GEOM" );
|
||||
GEOM::GEOM_Gen_var geomGen = GEOM::GEOM_Gen::_narrow( comp );
|
||||
geomGen = GEOM::GEOM_Gen::_narrow( comp );
|
||||
}
|
||||
if ( !CORBA::is_nil( geomGen ) )
|
||||
{
|
||||
TopoDS_Shape aTopoDSShape = GEOM_Client().GetShape( geomGen, theObject );
|
||||
|
@ -45,8 +45,11 @@ static bool getShape( const GEOM::GEOM_Object_ptr& theObject, TopoDS_Shape& theS
|
||||
{
|
||||
if ( !CORBA::is_nil( theObject ) )
|
||||
{
|
||||
static GEOM::GEOM_Gen_var myGeom;
|
||||
if(CORBA::is_nil(myGeom) {
|
||||
Engines::Component_var comp = QAD_Application::getDesktop()->getEngine( "FactoryServer", "GEOM" );
|
||||
GEOM::GEOM_Gen_var myGeom = GEOM::GEOM_Gen::_narrow( comp );
|
||||
myGeom = GEOM::GEOM_Gen::_narrow( comp );
|
||||
}
|
||||
TopoDS_Shape aTopoDSShape = GEOM_Client().GetShape( myGeom, theObject );
|
||||
|
||||
if ( !aTopoDSShape.IsNull() )
|
||||
|
Loading…
Reference in New Issue
Block a user