mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 14:02:27 +00:00
Fix for inverse update on delete
This commit is contained in:
@@ -1732,7 +1732,8 @@ void IfcFile::removeEntity(IfcUtil::IfcBaseClass* entity) {
|
|||||||
entities_by_ref_t::iterator byref_it = byref.find(name);
|
entities_by_ref_t::iterator byref_it = byref.find(name);
|
||||||
if (byref_it != byref.end()) {
|
if (byref_it != byref.end()) {
|
||||||
std::vector<unsigned>& ids = byref_it->second;
|
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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user