mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:51:20 +02:00
clean up actions when DeleteEntityOperator's list is processed rather than as it's made
This commit is contained in:
parent
57d85cece0
commit
9cae11cc3c
2 changed files with 1 additions and 7 deletions
|
@ -46,13 +46,6 @@ void DeleteEntityOperator::addEntityIDToDeleteList(const EntityItemID& searchEnt
|
||||||
//assert(false);
|
//assert(false);
|
||||||
qCDebug(entities) << "that's UNEXPECTED, we got a _containingElement, but couldn't find the oldEntity!";
|
qCDebug(entities) << "that's UNEXPECTED, we got a _containingElement, but couldn't find the oldEntity!";
|
||||||
} else {
|
} else {
|
||||||
const EntityTree* tree = details.containingElement->getTree();
|
|
||||||
if (tree) {
|
|
||||||
EntitySimulation* simulation = tree->getSimulation();
|
|
||||||
if (simulation) {
|
|
||||||
details.entity->clearActions(simulation);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
details.cube = details.containingElement->getAACube();
|
details.cube = details.containingElement->getAACube();
|
||||||
_entitiesToDelete << details;
|
_entitiesToDelete << details;
|
||||||
_lookingCount++;
|
_lookingCount++;
|
||||||
|
|
|
@ -381,6 +381,7 @@ void EntityTree::processRemovedEntities(const DeleteEntityOperator& theOperator)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_simulation) {
|
if (_simulation) {
|
||||||
|
theEntity->clearActions(_simulation);
|
||||||
_simulation->removeEntity(theEntity);
|
_simulation->removeEntity(theEntity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue