diff --git a/indra/llxml/llcontrol.h b/indra/llxml/llcontrol.h index 77065dcf8d330fe2412c5ac0da02f1a6a01fa152..0d805e72d2589814e3211fc62427dd52593bf0da 100644 --- a/indra/llxml/llcontrol.h +++ b/indra/llxml/llcontrol.h @@ -134,6 +134,9 @@ class LLControlVariable : public LLRefCount commit_signal_t* getCommitSignal() { return &mCommitSignal; } validate_signal_t* getValidateSignal() { return &mValidateSignal; } +// [RLVa:KB] - Patch: RLVa-2.1.0 + bool hasUnsavedValue() { return mValues.size() >= 2; } +// [/RLVa:KB] bool isDefault() { return (mValues.size() == 1); } bool shouldSave(bool nondefault_only); bool isPersisted() { return mPersist != PERSIST_NO; } diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 9efd13d6678951ec0c35cff1a129b49f41fce727..972d44b5334df0ac0d6ec89664b78a07bdbd4345 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2848,6 +2848,21 @@ bool LLAppViewer::initConfiguration() LLEventPumps::instance().obtain("LLControlGroup").post(LLSDMap("init", *ki)); } +// [RLVa:KB] - Patch: RLVa-2.1.0 + if (LLControlVariable* pControl = gSavedSettings.getControl(RLV_SETTING_MAIN)) + { + if ( (pControl->getValue().asBoolean()) && (pControl->hasUnsavedValue()) ) + { + pControl->resetToDefault(); + pControl->setValue(false); + + std::ostringstream msg; + msg << LLTrans::getString("RLVaToggleMessageLogin", LLSD().with("[STATE]", LLTrans::getString("RLVaToggleDisabled"))); + OSMessageBox(msg.str(), LLStringUtil::null, OSMB_OK); + } + } +// [/RLVa:KB] + return true; // Config was successful. }