summaryrefslogtreecommitdiff
path: root/indra/newview/lllocationinputctrl.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-11 09:19:20 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-11 09:19:20 +0000
commit1b1dd127a4329cc7fed9d36608f4fc04ff056843 (patch)
tree7c998ab7f4037aee8446817293bedafffd7958c2 /indra/newview/lllocationinputctrl.cpp
parent6d738f25d9be0f4b576c8a55e9091ced589daf71 (diff)
parenta618a3913af506878adf59a2c5b5fb12e665e35b (diff)
merge.
Diffstat (limited to 'indra/newview/lllocationinputctrl.cpp')
-rw-r--r--indra/newview/lllocationinputctrl.cpp59
1 files changed, 32 insertions, 27 deletions
diff --git a/indra/newview/lllocationinputctrl.cpp b/indra/newview/lllocationinputctrl.cpp
index 0ea4b1f6da..4100e2fc61 100644
--- a/indra/newview/lllocationinputctrl.cpp
+++ b/indra/newview/lllocationinputctrl.cpp
@@ -577,7 +577,7 @@ void LLLocationInputCtrl::reshape(S32 width, S32 height, BOOL called_from_parent
if (isHumanReadableLocationVisible)
{
- positionMaturityIcon();
+ refreshMaturityIcon();
}
}
@@ -737,32 +737,7 @@ void LLLocationInputCtrl::refreshLocation()
setText(location_name);
isHumanReadableLocationVisible = true;
- // Updating maturity rating icon.
- LLViewerRegion* region = gAgent.getRegion();
- if (!region)
- return;
-
- U8 sim_access = region->getSimAccess();
- switch(sim_access)
- {
- case SIM_ACCESS_PG:
- mMaturityIcon->setValue(mIconMaturityGeneral->getName());
- mMaturityIcon->setVisible(TRUE);
- break;
-
- case SIM_ACCESS_ADULT:
- mMaturityIcon->setValue(mIconMaturityAdult->getName());
- mMaturityIcon->setVisible(TRUE);
- break;
-
- default:
- mMaturityIcon->setVisible(FALSE);
- }
-
- if (mMaturityIcon->getVisible())
- {
- positionMaturityIcon();
- }
+ refreshMaturityIcon();
}
// returns new right edge
@@ -878,6 +853,36 @@ void LLLocationInputCtrl::refreshHealth()
}
}
+void LLLocationInputCtrl::refreshMaturityIcon()
+{
+ // Updating maturity rating icon.
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region)
+ return;
+
+ U8 sim_access = region->getSimAccess();
+ switch(sim_access)
+ {
+ case SIM_ACCESS_PG:
+ mMaturityIcon->setValue(mIconMaturityGeneral->getName());
+ mMaturityIcon->setVisible(TRUE);
+ break;
+
+ case SIM_ACCESS_ADULT:
+ mMaturityIcon->setValue(mIconMaturityAdult->getName());
+ mMaturityIcon->setVisible(TRUE);
+ break;
+
+ default:
+ mMaturityIcon->setVisible(FALSE);
+ }
+
+ if (mMaturityIcon->getVisible())
+ {
+ positionMaturityIcon();
+ }
+}
+
void LLLocationInputCtrl::positionMaturityIcon()
{
const LLFontGL* font = mTextEntry->getFont();