X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fmed.git;a=blobdiff_plain;f=src%2FMEDCalc%2Fgui%2FMEDModule.cxx;h=c71d4bf8a4b9bd156e33ef995172b8a7ff192bc4;hp=78659c775256679c4a26adc76ed9d96df5e6578a;hb=552a8af2b947aac25e278efe119394cad4acc23f;hpb=0946beb4bbeefcdea393f97fcb63654e1dca2eab diff --git a/src/MEDCalc/gui/MEDModule.cxx b/src/MEDCalc/gui/MEDModule.cxx index 78659c775..c71d4bf8a 100644 --- a/src/MEDCalc/gui/MEDModule.cxx +++ b/src/MEDCalc/gui/MEDModule.cxx @@ -51,7 +51,6 @@ #include "MEDFactoryClient.hxx" #include "MEDPresentationManager_i.hxx" -#include "MED_Component_Generator.hxx" #include #include @@ -110,23 +109,14 @@ void MEDModule::init() { // initialize FIELDS module engine (load, if necessary) - Engines::EngineComponent_var comp; - if ( CORBA::is_nil( _MED_engine ) ) { - SALOME_NamingService_Abstract *ns = SalomeApp_Application::namingService(); - if( dynamic_cast(ns) ) - { - comp = SalomeApp_Application::lcc()->FindOrLoad_Component( "FactoryServer", "FIELDS" ); - } - else - { - comp = RetrieveMEDInstance(); - CORBA::Object_var comp2 = CORBA::Object::_narrow(comp); - KERNEL::RegisterCompo("FIELDS",comp2); - } - _MED_engine = MED_ORB::MED_Gen::_narrow( comp ); - if (CORBA::is_nil( _MED_engine )) { - STDLOG("Could not narrow FIELDS engine"); - } + + if (CORBA::is_nil(_MED_engine)) { + Engines::EngineComponent_var comp = + SalomeApp_Application::lcc()->FindOrLoad_Component("FactoryServer", "FIELDS"); + _MED_engine = MED_ORB::MED_Gen::_narrow(comp); + } + if (CORBA::is_nil( _MED_engine )) { + STDLOG("Could not narrow FIELDS engine"); } }