summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 73e105cddf..eb1b758332 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1735,6 +1735,22 @@ void LLFloaterPreference::onChangeMaturity()
|| sim_access == SIM_ACCESS_ADULT);
getChild<LLIconCtrl>("rating_icon_adult")->setVisible(sim_access == SIM_ACCESS_ADULT);
+
+ // Update Legacy Search maturity settings
+ bool can_access_mature = gAgent.canAccessMature();
+ bool can_access_adult = gAgent.canAccessAdult();
+ if (!can_access_mature)
+ {
+ gSavedSettings.setBOOL("ShowMatureSims", false);
+ gSavedSettings.setBOOL("ShowMatureLand", false);
+ gSavedSettings.setBOOL("ShowMatureClassifieds", false);
+ }
+ if (!can_access_adult)
+ {
+ gSavedSettings.setBOOL("ShowAdultSims", false);
+ gSavedSettings.setBOOL("ShowAdultLand", false);
+ gSavedSettings.setBOOL("ShowAdultClassifieds", false);
+ }
}
void LLFloaterPreference::onChangeComplexityMode(const LLSD& newvalue)