From 2709f37bd795098ae6f67a19870edfc4d438625f Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Tue, 9 Mar 2010 21:42:09 +0200 Subject: Fixed (EXT-4704) Add maturity icons to Prefs -> General. - Fixed removing "Adult" rating option for agents without adult access permission. --HG-- branch : product-engine --- indra/newview/llfloaterpreference.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 8bffe9bf57..f146c76005 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -525,13 +525,15 @@ void LLFloaterPreference::onOpen(const LLSD& key) // if they're not adult or a god, they shouldn't see the adult selection, so delete it if (!gAgent.isAdult() && !gAgent.isGodlike()) { - // we're going to remove the adult entry from the combo. This obviously depends - // on the order of items in the XML file, but there doesn't seem to be a reasonable - // way to depend on the field in XML called 'name'. - maturity_combo->remove(0); + // we're going to remove the adult entry from the combo + LLScrollListCtrl* maturity_list = maturity_combo->findChild("ComboBox"); + if (maturity_list) + { + maturity_list->deleteItems(LLSD(SIM_ACCESS_ADULT)); + } } childSetVisible("maturity_desired_combobox", true); - childSetVisible("maturity_desired_textbox", false); + childSetVisible("maturity_desired_textbox", false); } else { -- cgit v1.2.3