summaryrefslogtreecommitdiff
path: root/indra/llui/lldockablefloater.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-08-05 11:19:42 -0700
committerRichard Linden <none@none>2010-08-05 11:19:42 -0700
commit5e56b2d4acaecf6b1c9e1789748b90836a7bd2c6 (patch)
treefc6a18bce3c560e5a5fbd25b224cc0d9ab580628 /indra/llui/lldockablefloater.cpp
parentb2028085fdfddfd5a7ac0f52d9f34b84457b3b98 (diff)
parentc89ff6e80be24f3c4c910b7f380ff587f5853455 (diff)
merge
Diffstat (limited to 'indra/llui/lldockablefloater.cpp')
-rw-r--r--indra/llui/lldockablefloater.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 4f5fcddbf4..f9983278d1 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -50,6 +50,7 @@ void LLDockableFloater::init(LLDockableFloater* thiz)
thiz->setCanDock(true);
thiz->setCanMinimize(TRUE);
thiz->setOverlapsScreenChannel(false);
+ thiz->mForceDocking = false;
}
LLDockableFloater::LLDockableFloater(LLDockControl* dockControl,
@@ -81,6 +82,12 @@ LLDockableFloater::~LLDockableFloater()
BOOL LLDockableFloater::postBuild()
{
+ // Remember we should force docking when the floater is opened for the first time
+ if (mIsDockedStateForcedCallback != NULL && mIsDockedStateForcedCallback())
+ {
+ mForceDocking = true;
+ }
+
mDockTongue = LLUI::getUIImage("windows/Flyout_Pointer.png");
LLFloater::setDocked(true);
return LLView::postBuild();
@@ -134,6 +141,14 @@ void LLDockableFloater::resetInstance()
void LLDockableFloater::setVisible(BOOL visible)
{
+ // Force docking if requested
+ if (visible && mForceDocking)
+ {
+ setCanDock(true);
+ setDocked(true);
+ mForceDocking = false;
+ }
+
if(visible && isDocked())
{
resetInstance();