diff options
Diffstat (limited to 'indra/newview/llfloaterscripting.cpp')
| -rw-r--r-- | indra/newview/llfloaterscripting.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llfloaterscripting.cpp b/indra/newview/llfloaterscripting.cpp index 0719ced58d..959d4eaeb4 100644 --- a/indra/newview/llfloaterscripting.cpp +++ b/indra/newview/llfloaterscripting.cpp @@ -42,6 +42,7 @@ #include "lleventcoro.h" #include "llviewermenufile.h" #include "llappviewer.h" +#include "llscripteditorws.h" namespace { @@ -82,10 +83,35 @@ LLFloaterScripting::LLFloaterScripting(const LLSD& seed) bool LLFloaterScripting::postBuild() { - refresh(); + // Subscribe to tight integration changes + mTightIntegrationConnection = gSavedSettings.getControl("ExternalEditorTightIntegration")->getSignal()->connect( + boost::bind(&LLFloaterScripting::onTightIntegrationChanged, this)); + + // Apply initial state + onTightIntegrationChanged(); + return true; } +LLFloaterScripting::~LLFloaterScripting() +{ + mTightIntegrationConnection.disconnect(); +} + +void LLFloaterScripting::onTightIntegrationChanged() +{ + bool tight = gSavedSettings.getBOOL("ExternalEditorTightIntegration"); + + // Force websocket on when tight integration is enabled + if (LLScriptEditorWSServer::isTightIntegration()) + { + gSavedSettings.setBOOL("ExternalWebsocketSyncEnable", true); + } + + // Disable websocket checkbox when tight integration is on + getChild<LLCheckBoxCtrl>("websocket_sync_enable")->setEnabled(!tight); +} + void LLFloaterScripting::onClickClose() { closeFloater(); |
