From: apo Date: Thu, 27 Jan 2005 11:37:24 +0000 (+0000) Subject: Fix on Bug PAL7838 X-Git-Tag: V2_2_0b1~8 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=31d7f826d7d5bfd80aae310024965de13b0e15f8;p=modules%2Fkernel.git Fix on Bug PAL7838 STUD-006regress: The UseCase Browser contents isn't restored after "Save - Open" --- diff --git a/src/SALOMEDS/SALOMEDS_SObject_i.cxx b/src/SALOMEDS/SALOMEDS_SObject_i.cxx index f8cee3794..6af22bf1c 100644 --- a/src/SALOMEDS/SALOMEDS_SObject_i.cxx +++ b/src/SALOMEDS/SALOMEDS_SObject_i.cxx @@ -537,17 +537,8 @@ char* SALOMEDS_SObject_i::GetIOR() { SALOMEDS_SObject_i::TAttrHolder SALOMEDS_SObject_i::_FindGenAttribute(const Handle(TDF_Attribute)& theAttr) { - TAttrHolder anGenAttr; - - Standard_GUID aGUID = theAttr->ID(); - - TGUID2AttrIDMap::const_iterator anIter = __GUID2AttrIDMap__.find(aGUID); - if(anIter != __GUID2AttrIDMap__.end()){ - const TAttributeID& anAttributeID = anIter->second; - anGenAttr = _FindGenAttribute(anAttributeID.c_str()); - } - - return anGenAttr; + std::string aType = GetType(theAttr); + return _FindGenAttribute(aType.c_str()); } @@ -695,7 +686,6 @@ Handle(TDF_Attribute) if(!_lab.FindAttribute(aGUID,anAttr)){ _study->CheckLocked(); anAttr = TDataStd_TreeNode::Set(_lab,aGUID); - _lab.AddAttribute(anAttr); return anAttr; } } @@ -705,7 +695,6 @@ Handle(TDF_Attribute) if(!_lab.FindAttribute(aGUID,anAttr)){ _study->CheckLocked(); anAttr = TDataStd_UAttribute::Set(_lab,aGUID); - _lab.AddAttribute(anAttr); return anAttr; } }