From: mpv Date: Thu, 3 Feb 2005 08:12:34 +0000 (+0000) Subject: MPV: X-Git-Tag: V2_2_0~12 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ccbcbecbbd2f874cc142bbe491a1d3474135b218;p=modules%2Fkernel.git MPV: Fix for bug PAL7956: Don not chechLock on CORBA attribute creation (without OCAF document modifications) --- diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index dc4426a71..35c5087af 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -577,8 +577,8 @@ SALOMEDS_SObject_i::_CreateGenAttribute(const Handle(TDF_Attribute)& theAttr, if(anIter != __AttrID2FunMap__.end()){ const TAttrID2FunMap::mapped_type& aValue = anIter->second; - if(aValue.myIsCheckLockedStudy()) - _study->CheckLocked(); + //if(aValue.myIsCheckLockedStudy()) // mpv 03.02.05: creation of CORBA objects does not modify the study + // _study->CheckLocked(); anAttr = aValue.myNewInstance(theAttr,this); return TAttrHolder(anAttr,anAttr->_this()); @@ -631,25 +631,17 @@ SALOMEDS_SObject_i::_FindGenAttribute(const char* theType) } -SALOMEDS::GenericAttribute_ptr -SALOMEDS_SObject_i::_FindCORBAAttribute(const char* theType) +CORBA::Boolean +SALOMEDS_SObject_i::FindAttribute(SALOMEDS::GenericAttribute_out theAttribute, + const char* theType) { TAttrHolder anAttr = _FindGenAttribute(theType); SALOMEDS::GenericAttribute_var anGenAttr = anAttr.second; if(!CORBA::is_nil(anGenAttr)){ - return anGenAttr._retn(); + theAttribute = SALOMEDS::GenericAttribute::_duplicate(anGenAttr); + return true; } - - return SALOMEDS::GenericAttribute::_nil(); -} - - -CORBA::Boolean -SALOMEDS_SObject_i::FindAttribute(SALOMEDS::GenericAttribute_out theAttribute, - const char* theType) -{ - theAttribute = _FindCORBAAttribute(theType); - return !CORBA::is_nil(theAttribute); + return false; } diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.hxx b/src/SALOMEDS/SALOMEDS_SObject_i.hxx index 45ff3e5d3..c5f534180 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.hxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.hxx @@ -135,9 +135,6 @@ protected: TAttrHolder _FindGenAttribute(const char* theTypeOfAttribute); - SALOMEDS::GenericAttribute_ptr - _FindCORBAAttribute(const char* theTypeOfAttribute); - Handle(TDF_Attribute) _AddAttribute(const char* theTypeOfAttribute);