summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofile.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2010-12-07 15:05:57 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2010-12-07 15:05:57 -0500
commit3c00c1ba4590e758f84f5c97f2d407aa7e605ad8 (patch)
tree0d6771596b57ecf87f2504066543b56bbcf65d80 /indra/newview/llpanelprofile.cpp
parentefe65d90e027e4385c97d76244844fa8660dc7ce (diff)
parentd9b4570883652d647c05083c18fac1a088efd6e2 (diff)
merge viewer-development into web-profiles
Diffstat (limited to 'indra/newview/llpanelprofile.cpp')
-rwxr-xr-xindra/newview/llpanelprofile.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 240f651eec..03c1cc8455 100755
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -278,6 +278,10 @@ void LLPanelProfile::setAllChildrenVisible(BOOL visible)
void LLPanelProfile::openPanel(LLPanel* panel, const LLSD& params)
{
+ // Hide currently visible panel (STORM-690).
+ setAllChildrenVisible(FALSE);
+
+ // Add the panel or bring it to front.
if (panel->getParent() != this)
{
addChild(panel);
@@ -304,6 +308,18 @@ void LLPanelProfile::closePanel(LLPanel* panel)
if (panel->getParent() == this)
{
removeChild(panel);
+
+ // Make the underlying panel visible.
+ const child_list_t* child_list = getChildList();
+ if (child_list->size() > 0)
+ {
+ child_list->front()->setVisible(TRUE);
+ child_list->front()->setFocus(TRUE); // prevent losing focus by the floater
+ }
+ else
+ {
+ llwarns << "No underlying panel to make visible." << llendl;
+ }
}
}