mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +02:00
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:
parent
4c0a0a84fa
commit
3ae65bba15
1 changed files with 5 additions and 0 deletions
|
@ -112,6 +112,11 @@ void EntityTree::eraseAllOctreeElements(bool createNewRoot) {
|
|||
|
||||
resetClientEditStats();
|
||||
clearDeletedEntities();
|
||||
|
||||
{
|
||||
QWriteLocker locker(&_needsParentFixupLock);
|
||||
_needsParentFixup.clear();
|
||||
}
|
||||
}
|
||||
|
||||
void EntityTree::readBitstreamToTree(const unsigned char* bitstream,
|
||||
|
|
Loading…
Reference in a new issue