From ca6601cbb8d4ef9828466c8d1316ae28d0c7b7b8 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Tue, 20 Jan 2026 21:17:35 +0200 Subject: #5304 fix UI inconsistencies related to maturity setting in Legacy Search floater --- indra/newview/llfloaterpreference.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'indra/newview/llfloaterpreference.cpp') 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("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) -- cgit v1.3