Fixed crash when importing entities from JSON multiple times

This happened because the Clipboard wasn't being completely cleared between uses.

This bug can also manifest in another way (if Interface doesn't crash): the imported entities appear very far away, instead of right in front of the user. This happens for the same reason as the crash: the Clipboard still contains some previously-imported entities. That causes us to calculate the wrong dimensions for the newly-imported entities which is why they are added to the domain far away.
This commit is contained in:
Oren Hurvitz 2018-04-17 15:51:41 +03:00
parent 4c0a0a84fa
commit 3ae65bba15

View file

@ -112,6 +112,11 @@ void EntityTree::eraseAllOctreeElements(bool createNewRoot) {
resetClientEditStats();
clearDeletedEntities();
{
QWriteLocker locker(&_needsParentFixupLock);
_needsParentFixup.clear();
}
}
void EntityTree::readBitstreamToTree(const unsigned char* bitstream,