From 31d7f826d7d5bfd80aae310024965de13b0e15f8 Mon Sep 17 00:00:00 2001 From: apo Date: Thu, 27 Jan 2005 11:37:24 +0000 Subject: [PATCH] Fix on Bug PAL7838 STUD-006regress: The UseCase Browser contents isn't restored after "Save - Open" --- src/SALOMEDS/SALOMEDS_SObject_i.cxx | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) 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; } } -- 2.39.2