From: srn Date: Wed, 13 Dec 2006 11:51:37 +0000 (+0000) Subject: Fixed method InsertBefore X-Git-Tag: SALOMEDS_UnitTests_1_2~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3b40c4f3fab721c0cf3885a77acbcdc11895ddcb;p=modules%2Fkernel.git Fixed method InsertBefore --- diff --git a/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx b/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx index a0da803d2..6997908eb 100644 --- a/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx +++ b/src/SALOMEDS/SALOMEDS_UseCaseBuilder_i.cxx @@ -101,7 +101,7 @@ CORBA::Boolean SALOMEDS_UseCaseBuilder_i::InsertBefore(SALOMEDS::SObject_ptr the { SALOMEDS::Locker lock; if(_impl.IsNull() || theFirst->_is_nil() || theNext->_is_nil()) return 0; - return _impl->AppendTo(_impl->GetSObject(theFirst->GetID()), _impl->GetSObject(theNext->GetID())); + return _impl->InsertBefore(_impl->GetSObject(theFirst->GetID()), _impl->GetSObject(theNext->GetID())); } @@ -218,7 +218,9 @@ SALOMEDS::UseCaseIterator_ptr SALOMEDS_UseCaseBuilder_i::GetUseCaseIterator(SALO SALOMEDS::Locker lock; if(_impl.IsNull()) return SALOMEDS::UseCaseIterator::_nil(); - Handle(SALOMEDSImpl_UseCaseIterator) anItr = _impl->GetUseCaseIterator(_impl->GetSObject(theObject->GetID())); + Handle(SALOMEDSImpl_UseCaseIterator) anItr; + if(!CORBA::is_nil(theObject)) anItr = _impl->GetUseCaseIterator(_impl->GetSObject(theObject->GetID())); + else anItr = _impl->GetUseCaseIterator(NULL); SALOMEDS_UseCaseIterator_i* aServant = new SALOMEDS_UseCaseIterator_i(anItr, _orb); SALOMEDS::UseCaseIterator_var anIterator = SALOMEDS::UseCaseIterator::_narrow(aServant->_this()); return anIterator._retn();