From 9ee65ab474faf7282b733526fc5aa990ab2706ad Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Thu, 1 Mar 2018 13:31:43 -0800 Subject: [PATCH] don't use clipboard when loading serverless domains --- interface/src/Application.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 5ea2935024..8eda7ff8c9 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3113,7 +3113,6 @@ void Application::loadServerlessDomain(QUrl domainURL) { } clearDomainOctreeDetails(); - _entityClipboard->eraseAllOctreeElements(); if (domainURL.isEmpty()) { return; @@ -3131,10 +3130,17 @@ void Application::loadServerlessDomain(QUrl domainURL) { permissions.setAll(true); DependencyManager::get()->setPermissions(permissions); - getEntities()->getTree()->eraseAllOctreeElements(); - if (importEntities(domainURL.toString())) { - pasteEntities(0.0f, 0.0f, 0.0f); + EntityTreePointer tmpTree(new EntityTree()); + tmpTree->setIsServerlessMode(true); + tmpTree->createRootElement(); + auto myAvatar = getMyAvatar(); + tmpTree->setMyAvatar(myAvatar); + bool success = tmpTree->readFromURL(domainURL.toString()); + if (success) { + tmpTree->reaverageOctreeElements(); + tmpTree->sendEntities(&_entityEditSender, getEntities()->getTree(), 0, 0, 0); } + _fullSceneReceivedCounter++; }