summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2026-01-20 21:17:35 +0200
committerGitHub <noreply@github.com>2026-01-20 21:17:35 +0200
commitca6601cbb8d4ef9828466c8d1316ae28d0c7b7b8 (patch)
treef302776c608b48d1e5b892378b694a6b286536d5 /indra/newview/llfloaterpreference.cpp
parent6579ff6282f86ddc2ae235f421c5ccdda4871a78 (diff)
#5304 fix UI inconsistencies related to maturity setting in Legacy Search floater
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 c5c1e01538..6e27fd694a 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)