GEOMGUI uses standard LifeCycle to instanciate GEOM engine

This commit is contained in:
Anthony Geay 2022-01-24 14:56:07 +01:00
parent 8df37edc3d
commit 58bfedf8f6

View File

@ -223,17 +223,7 @@ GeometryGUI::GeometryGUI() : SalomeApp_Module( "GEOM" )
if ( CORBA::is_nil( myComponentGeom ) ) if ( CORBA::is_nil( myComponentGeom ) )
{ {
SALOME_NamingService_Abstract *ns = SalomeApp_Application::namingService(); SALOME_NamingService_Abstract *ns = SalomeApp_Application::namingService();
Engines::EngineComponent_var comp; Engines::EngineComponent_var comp = SalomeApp_Application::lcc()->FindOrLoad_Component( "FactoryServer", "GEOM" );
if( dynamic_cast<SALOME_NamingService *>(ns) )
{
comp = SalomeApp_Application::lcc()->FindOrLoad_Component( "FactoryServer", "GEOM" );
}
else
{
comp = RetrieveGEOMInstance();
CORBA::Object_var comp2 = CORBA::Object::_narrow(comp);
KERNEL::RegisterCompo("GEOM",comp2);
}
myComponentGeom = GEOM::GEOM_Gen::_narrow( comp ); myComponentGeom = GEOM::GEOM_Gen::_narrow( comp );
} }