Salome HOME
Merge branch 'rbe/evol-job-newparams'
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_Driver_i.cxx
index a179db962e43e38410eb00eb55680b25d6cb7857..8dcb46a44fa1e38f1c9ecf7e0d623765562dfa93 100644 (file)
@@ -27,6 +27,7 @@
 #include "SALOMEDS_SComponent_i.hxx"
 #include "SALOMEDS_Study_i.hxx"
 #include "SALOMEDS.hxx"
+#include <SALOMEDSImpl_IParameters.hxx>
 #include <stdlib.h>
 
 #include CORBA_CLIENT_HEADER(SALOME_Session)
@@ -202,7 +203,8 @@ std::string SALOMEDS_Driver_i::IORToLocalPersistentID(const SALOMEDSImpl_SObject
   if ( !CORBA::is_nil(_driver) ) {
     CORBA::String_var pers_string =_driver->IORToLocalPersistentID(so.in(), IORString.c_str(),
                                                                    isMultiFile, isASCII);
-    pstr = pers_string;
+    if ( pers_string.in() )
+      pstr = pers_string;
   }
 
   so->UnRegister();
@@ -357,6 +359,10 @@ SALOMEDS_DriverFactory_i::~SALOMEDS_DriverFactory_i()
 
 SALOMEDSImpl_Driver* SALOMEDS_DriverFactory_i::GetDriverByType(const std::string& theComponentType)
 {
+
+  if ( theComponentType == SALOMEDSImpl_IParameters::getDefaultVisualComponent() )
+    return NULL; // skip the "Interface Applicative" component
+
   SALOMEDSImpl_Driver* driver = 0;
 
   CORBA::Object_var obj = SALOME_LifeCycleCORBA(_name_service).FindOrLoad_Component("FactoryServer", theComponentType.c_str());