History

more code review response

Seth Alves committed 8 years ago

Commit 507dfa51 parent bdd926f4 files · +12 −11Browse files

Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all

Unified · Split

interface/src/Application.cpp+3−4
@@ -3109,10 +3109,7 @@ bool Application::importFromZIP(const QString& filePath) { · 3108 unmodified lines
31093109 }
31103110
31113111 void Application::setServerlessDomain(bool serverlessDomain) {
3112− if (_serverlessDomain != serverlessDomain) {
3113− _serverlessDomain = serverlessDomain;
3114− getEntities()->getTree()->setIsServerlessMode(_serverlessDomain);
3115− }
3112+ getEntities()->getTree()->setIsServerlessMode(serverlessDomain);
31163113 }
31173114
31183115 void Application::loadServerlessDomain(QUrl domainURL) {
@@ -3136,6 +3133,8 @@ void Application::loadServerlessDomain(QUrl domainURL) { · 17 unmodified lines
31363133 permissions.setAll(true);
31373134 DependencyManager::get<NodeList>()->setPermissions(permissions);
31383135
3136+ // we can't import directly into the main tree because we would need to lock it, and
3137+ // Octree::readFromURL calls loop.exec which can run code which will also attempt to lock the tree.
31393138 EntityTreePointer tmpTree(new EntityTree());
31403139 tmpTree->setIsServerlessMode(true);
31413140 tmpTree->createRootElement();