Fix for inverse update on delete

This commit is contained in:
Thomas Krijnen
2018-07-12 11:37:23 +02:00
parent b94fd33acf
commit e65764b58d
+2 -1
View File
@@ -1732,7 +1732,8 @@ void IfcFile::removeEntity(IfcUtil::IfcBaseClass* entity) {
entities_by_ref_t::iterator byref_it = byref.find(name);
if (byref_it != byref.end()) {
std::vector<unsigned>& ids = byref_it->second;
std::remove(ids.begin(), ids.end(), name);
std::vector<unsigned>::const_iterator removed_from = std::remove(ids.begin(), ids.end(), id);
ids.erase(removed_from, ids.end());
}
}
}