Salome HOME
Fix repeated items
[modules/geom.git] / src / GEOM_I / GEOM_Gen_i.cc
index 8f3a876ad03520702917ec57efb237551a8c0044..7fa57d213f46171710e44f9f57230d6f28872d81 100755 (executable)
@@ -3271,8 +3271,12 @@ void GEOM_Gen_i::GetEntriesToCleanStudy(SALOMEDS::Study_ptr theStudy,
         char* aSubEntryStr = new char[aStrLen+1];
         aSubEntry.ToUTF8CString( aSubEntryStr );
         foundIt = aParents.find( aSubEntryStr );
-        if ( foundIt == aParents.end() ) // add to sub-objects if it is not in parents list
+        if ( foundIt == aParents.end() ) // add to sub-objects if it is not in parents list
           aChildren.insert( aSubEntryStr );
+          foundIt = anOthers.find( aSubEntryStr );
+          if ( foundIt != anOthers.end() )
+            anOthers.erase( foundIt );
+        }
       }
     }