diff options
author | Richard Linden <none@none> | 2010-09-16 17:55:28 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2010-09-16 17:55:28 -0700 |
commit | 2dc14c66d4f50dfe4d140b5630cadf2febcee09d (patch) | |
tree | 5abaa6a86e3ca6a9541cd1db560d34179e1df257 /indra/llui/llnotifications.cpp | |
parent | 57d4e7261d2a451f2066b68e163d6632fcac246e (diff) |
fix for all notifications being ignored by default
Diffstat (limited to 'indra/llui/llnotifications.cpp')
-rw-r--r-- | indra/llui/llnotifications.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index bd58fe2637..6a0d64e876 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -62,7 +62,7 @@ LLNotificationForm::FormElementBase::FormElementBase() LLNotificationForm::FormIgnore::FormIgnore() : text("text"), control("control"), - invert_control("invert_control", false), + invert_control("invert_control", true), save_option("save_option", false) {} @@ -190,7 +190,7 @@ LLNotificationForm::LLNotificationForm() LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotificationForm::Params& p) : mIgnore(IGNORE_NO), - mInvertSetting(false) + mInvertSetting(true) // ignore settings by default mean true=show, false=ignore { if (p.ignore.isProvided()) { @@ -353,18 +353,24 @@ LLControlVariablePtr LLNotificationForm::getIgnoreSetting() bool LLNotificationForm::getIgnored() { + bool ignored = false; if (mIgnore != LLNotificationForm::IGNORE_NO && mIgnoreSetting) { - return mIgnoreSetting->getValue().asBoolean() != mInvertSetting; + ignored = mIgnoreSetting->getValue().asBoolean(); + if (mInvertSetting) ignored = !ignored; } - return false; + return ignored; } void LLNotificationForm::setIgnored(bool ignored) { - if (mIgnoreSetting) mIgnoreSetting->setValue(ignored != mInvertSetting); + if (mIgnoreSetting) + { + if (mInvertSetting) ignored = !ignored; + mIgnoreSetting->setValue(ignored); + } } LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Params& p) |