summaryrefslogtreecommitdiff
path: root/indra/llui/llfloater.cpp
diff options
context:
space:
mode:
authorCho <cho@lindenlab.com>2013-02-25 18:11:51 +0000
committerCho <cho@lindenlab.com>2013-02-25 18:11:51 +0000
commitcbbf1504f015f42e3426a92129824e05021e1fe3 (patch)
tree4922b33e421f7c1184330f62793f6f9519e149de /indra/llui/llfloater.cpp
parent6194302a849431e84c046325d3cd19e92f62aa6f (diff)
parent4b6e1c26f05d89aa130a899803553940069457c0 (diff)
merging
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r--indra/llui/llfloater.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 734e2cfda7..27dd7f5b32 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -813,6 +813,20 @@ void LLFloater::closeFloater(bool app_quitting)
}
/*virtual*/
+void LLFloater::closeHostedFloater()
+{
+ // When toggling *visibility*, close the host instead of the floater when hosted
+ if (getHost())
+ {
+ getHost()->closeFloater();
+ }
+ else
+ {
+ closeFloater();
+ }
+}
+
+/*virtual*/
void LLFloater::reshape(S32 width, S32 height, BOOL called_from_parent)
{
LLPanel::reshape(width, height, called_from_parent);
@@ -1609,8 +1623,17 @@ void LLFloater::bringToFront( S32 x, S32 y )
// virtual
void LLFloater::setVisibleAndFrontmost(BOOL take_focus)
{
- setVisible(TRUE);
- setFrontmost(take_focus);
+ LLMultiFloater* hostp = getHost();
+ if (hostp)
+ {
+ hostp->setVisible(TRUE);
+ hostp->setFrontmost(take_focus);
+ }
+ else
+ {
+ setVisible(TRUE);
+ setFrontmost(take_focus);
+ }
}
void LLFloater::setFrontmost(BOOL take_focus)