From: mpa Date: Thu, 29 Dec 2016 16:01:29 +0000 (+0300) Subject: fix problems from GUI X-Git-Tag: Before_python3_27062017~1^2~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=17731f6b0ce47c3ec9564e5c25d495c0ef626ccf;p=modules%2Fkernel.git fix problems from GUI --- diff --git a/doc/salome/kernel_salome.dox b/doc/salome/kernel_salome.dox index 4fea5880d..da0acb4fa 100644 --- a/doc/salome/kernel_salome.dox +++ b/doc/salome/kernel_salome.dox @@ -114,6 +114,9 @@ salome.myStudy.SaveAsASCII("/home/user/MyStudy.hdf", study, False) # clear study salome.myStudy.Clear() +# init study +salome.myStudy.Init() + # find SALOMEDS component by its type scomponent = FindComponent("MyComponent") diff --git a/src/MPIContainer/MPIContainer_i.cxx b/src/MPIContainer/MPIContainer_i.cxx index 19f6f8fe0..7a10855d4 100644 --- a/src/MPIContainer/MPIContainer_i.cxx +++ b/src/MPIContainer/MPIContainer_i.cxx @@ -272,7 +272,7 @@ Engines_MPIContainer_i::Lcreate_component_instance( const char* genericRegisterN PyObject *pyCont = PyDict_GetItemString(globals, "pyCont"); PyObject *result = PyObject_CallMethod(pyCont, (char*)"create_component_instance", - (char*)"ssl", + (char*)"ss", aCompName.c_str(), instanceName.c_str()); const char *ior; diff --git a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx index e4852f4f4..c6f041c81 100644 --- a/src/ParallelContainer/SALOME_ParallelContainer_i.cxx +++ b/src/ParallelContainer/SALOME_ParallelContainer_i.cxx @@ -762,7 +762,7 @@ Engines_Parallel_Container_i::createPythonInstance(std::string genericRegisterNa PyObject *pyCont = PyDict_GetItemString(globals, "pyCont"); PyObject *result = PyObject_CallMethod(pyCont, (char*)"create_component_instance", - (char*)"ssl", + (char*)"ss", genericRegisterName.c_str(), instanceName.c_str()); const char *ior; diff --git a/src/SALOMEDS/SALOMEDS.cxx b/src/SALOMEDS/SALOMEDS.cxx index e228a6161..695992deb 100644 --- a/src/SALOMEDS/SALOMEDS.cxx +++ b/src/SALOMEDS/SALOMEDS.cxx @@ -115,7 +115,7 @@ extern "C" // Activate the objects. This tells the POA that the objects are ready to accept requests. PortableServer::ObjectId_var aStudy_iid = root_poa->activate_object(aStudy_i); aStudy = aStudy_i->_this(); - namingService.Register(aStudy.in(), "/Study"); + namingService.Register(aStudy, "/Study"); // Assign the value of the IOR in the study->root CORBA::String_var IORStudy = orb->object_to_string(aStudy); diff --git a/src/SALOMEDS/SALOMEDS_Study_i.cxx b/src/SALOMEDS/SALOMEDS_Study_i.cxx index 23cc0c031..63bf3c60f 100644 --- a/src/SALOMEDS/SALOMEDS_Study_i.cxx +++ b/src/SALOMEDS/SALOMEDS_Study_i.cxx @@ -165,10 +165,10 @@ namespace SALOMEDS { for (ObsListIter it (myObservers.begin()); it != myObservers.end(); ++it) { - if ( it->first->_is_equivalent(theObs) ) { - myObservers.erase( it ); - break; - } + if ( it->first->_is_equivalent(theObs) ) { + myObservers.erase( it ); + break; + } } } @@ -308,7 +308,7 @@ void SALOMEDS_Study_i::Clear() { SALOMEDS::Locker lock; if (_closed) - throw SALOMEDS::Study::StudyInvalidReference(); + return; //delete the builder servant PortableServer::POA_var poa=_builder->_default_POA(); PortableServer::ObjectId_var anObjectId = poa->servant_to_id(_builder); @@ -367,6 +367,7 @@ void SALOMEDS_Study_i::Clear() _impl->setNotifier(0); delete _notifier; delete _genObjRegister; + _notifier = NULL; _closed = true; }