summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-02 12:35:24 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-02 12:35:24 +0100
commite46f128d20f155b7bae7edb3aeac2a9653c1a433 (patch)
treef26e41a3528da449248c0a328f9755aeb7d3e988 /indra/newview/llfloaterpreference.cpp
parenta7085418df1ada6e19b94b6df772ed21e663d119 (diff)
parent32283a93e08a27e179486a5162367885131dffba (diff)
PE merge
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 3a73037ae8..804ef609ec 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -501,13 +501,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<LLScrollListCtrl>("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
{