Salome HOME
Fix on [Bug PAL7750] Regression of UNDO in GEOM
authorapo <apo@opencascade.com>
Thu, 20 Jan 2005 14:10:13 +0000 (14:10 +0000)
committerapo <apo@opencascade.com>
Thu, 20 Jan 2005 14:10:13 +0000 (14:10 +0000)
The regression was caused by last refactoring of SALOMEDS concerning improving memory menagement.
Bug PAL7023 - Problem loading MED file with a large number of families (same as VISU6154))

src/SALOMEDS/SALOMEDS_SObject_i.cxx

index 2ff17b580562eb0865da39a5ac79f742419fde2a..e3681ccf44f9923435f9dc7db35a9d2339465450 100644 (file)
@@ -535,20 +535,9 @@ SALOMEDS_SObject_i::_FindGenAttribute(const Handle(TDF_Attribute)& theAttr)
   Standard_GUID aGUID = theAttr->ID();
 
   TGUID2AttrIDMap::const_iterator anIter = __GUID2AttrIDMap__.find(aGUID);
-  if(anIter != __GUID2AttrIDMap__.end())
-  {
-    const ::TAttributeID& anAttributeID = anIter->second;
-    TAttrMap::const_iterator anIter = myAttrMap.find(anAttributeID);
-    if(anIter != myAttrMap.end())
-      anGenAttr = anIter->second;
-
-    SALOMEDS_GenericAttribute_i* anAttr = anGenAttr.first;
-    if(anAttr != NULL){
-      if(anAttr->GetAttribute() != theAttr)
-       anAttr->SetAttribute(theAttr);
-    }else{
-      anGenAttr = _CreateGenAttribute(theAttr,anAttributeID.c_str());
-    }
+  if(anIter != __GUID2AttrIDMap__.end()){
+    const TAttributeID& anAttributeID = anIter->second;
+    anGenAttr = _FindGenAttribute(anAttributeID.c_str());
   }
 
   return anGenAttr;