fix a couple of missing-parent bugs

This commit is contained in:
Seth Alves 2015-12-16 10:09:46 -08:00
parent b55596689f
commit 45d19167c9
3 changed files with 6 additions and 5 deletions

View file

@ -15,10 +15,9 @@ SpatiallyNestableWeakPointer AssignmentParentFinder::find(QUuid parentID, bool&
SpatiallyNestableWeakPointer parent;
// search entities
parent = _tree->findEntityByEntityItemID(parentID);
if (parent.lock()) {
success = true;
} else {
if (parent.expired()) {
success = false;
}
success = true;
return parent;
}

View file

@ -1254,6 +1254,8 @@ const AABox& EntityItem::getAABox(bool& success) const {
_cachedAABox = AABox(rotatedExtentsRelativeToRegistrationPoint);
_recalcAABox = false;
}
} else {
success = true;
}
return _cachedAABox;
}

View file

@ -240,8 +240,8 @@ bool EntityTree::updateEntityWithElement(EntityItemPointer entity, const EntityI
bool success;
AACube queryCube = childEntity->getQueryAACube(success);
if (!success) {
qCDebug(entities) << "Can't update child -- failed to get query-cube for" << childEntity->getID();
// XXX put on a list for later checking?
_missingParent.append(childEntity);
continue;
}
UpdateEntityOperator theChildOperator(getThisPointer(), containingElement, childEntity, queryCube);