From 2dc14c66d4f50dfe4d140b5630cadf2febcee09d Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Thu, 16 Sep 2010 17:55:28 -0700 Subject: fix for all notifications being ignored by default --- indra/llui/llnotifications.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/llui') 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) -- cgit v1.2.3