Salome HOME
GEOMGUI uses standard LifeCycle to instanciate GEOM engine agy/vadim_review
authorAnthony Geay <anthony.geay@edf.fr>
Mon, 24 Jan 2022 13:56:07 +0000 (14:56 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Mon, 24 Jan 2022 13:56:07 +0000 (14:56 +0100)
src/GEOMGUI/GeometryGUI.cxx

index e451b6f615e6269ed2855035b1085ab8fb8ea341..9f02f82eeb23c4264311979029fe8013afc4e0cc 100644 (file)
@@ -223,17 +223,7 @@ GeometryGUI::GeometryGUI() : SalomeApp_Module( "GEOM" )
   if ( CORBA::is_nil( myComponentGeom ) )
   {
     SALOME_NamingService_Abstract *ns = SalomeApp_Application::namingService();
-    Engines::EngineComponent_var comp;
-    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);
-    }
+    Engines::EngineComponent_var comp = SalomeApp_Application::lcc()->FindOrLoad_Component( "FactoryServer", "GEOM" );
     myComponentGeom = GEOM::GEOM_Gen::_narrow( comp );
   }