diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index f8153ff980..32e69366ae 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -6041,10 +6041,11 @@ bool Application::askToReplaceDomainContent(const QString& url) { if (DependencyManager::get()->getThisNodeCanReplaceContent()) { // Create a confirmation dialog when this call is made - static const QString infoText = "Your domain's content will be replaced but backup files of your " - "domain's content will not immediately be changed.\n Save a manual backup of your" - "models.json.gz file, usually stored at:\n" - "C:/Users/[username]/AppData/Roaming/High Fidelity/assignment-client/entities/models.json.gz"; + const int MAX_CHARACTERS_PER_LINE = 90; + static const QString infoText = simpleWordWrap("Your domain's content will be replaced but backup files of your " + "domain's content will not immediately be changed. Save a manual backup of your" + "models.json.gz file, usually stored at:", MAX_CHARACTERS_PER_LINE) + + "\nC:/Users/[username]/AppData/Roaming/High Fidelity/assignment-client/entities/models.json.gz"; bool agreeToReplaceContent = false; // assume false agreeToReplaceContent = QMessageBox::Yes == OffscreenUi::question("Are you sure you want to replace this domain's content set?", @@ -6052,15 +6053,14 @@ bool Application::askToReplaceDomainContent(const QString& url) { if (agreeToReplaceContent) { // Given confirmation, send request to domain server to replace content + qCDebug(interfaceapp) << "Attempting to replace domain content: " << url; QByteArray _url(url.toUtf8()); auto limitedNodeList = DependencyManager::get(); limitedNodeList->eachMatchingNode([](const SharedNodePointer& node) { return node->getType() == NodeType::EntityServer && node->getActiveSocket(); }, [&_url, limitedNodeList](const SharedNodePointer& octreeNode) { auto octreeFilePacketList = NLPacketList::create(PacketType::OctreeFileReplacementFromUrl, QByteArray(), true, true); - octreeFilePacketList->write(_url); - qCDebug(entities) << "Attempting to send an octree file url to replace domain content"; - + octreeFilePacketList->write(_url); limitedNodeList->sendPacketList(std::move(octreeFilePacketList), *octreeNode); return true; }); diff --git a/interface/src/scripting/DomainManagementScriptingInterface.cpp b/interface/src/scripting/DomainManagementScriptingInterface.cpp index 3b05b2d905..593fedad3c 100644 --- a/interface/src/scripting/DomainManagementScriptingInterface.cpp +++ b/interface/src/scripting/DomainManagementScriptingInterface.cpp @@ -9,7 +9,6 @@ // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html // #include "DomainManagementScriptingInterface.h" -#include "EntitiesLogging.h" #include "Application.h" #include "OffscreenUi.h" @@ -28,7 +27,3 @@ bool DomainManagementScriptingInterface::canReplaceDomainContent() { auto nodeList = DependencyManager::get(); return nodeList->getThisNodeCanReplaceContent(); } - -void DomainManagementScriptingInterface::replaceDomainContentSet(const QString& url){ - -} diff --git a/interface/src/scripting/DomainManagementScriptingInterface.h b/interface/src/scripting/DomainManagementScriptingInterface.h index ded0f843d7..85955254c7 100644 --- a/interface/src/scripting/DomainManagementScriptingInterface.h +++ b/interface/src/scripting/DomainManagementScriptingInterface.h @@ -32,9 +32,6 @@ public: public slots: Q_INVOKABLE bool canReplaceDomainContent(); -protected: - void replaceDomainContentSet(const QString& fileURL); - signals: void canReplaceDomainContentChanged(bool canReplaceDomainContent); };