summaryrefslogtreecommitdiff
path: root/indra/llui/lldockablefloater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lldockablefloater.cpp')
-rw-r--r--indra/llui/lldockablefloater.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 3d8670fef2..f9983278d1 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -49,12 +49,13 @@ void LLDockableFloater::init(LLDockableFloater* thiz)
thiz->setCanClose(TRUE);
thiz->setCanDock(true);
thiz->setCanMinimize(TRUE);
+ thiz->setOverlapsScreenChannel(false);
+ thiz->mForceDocking = false;
}
LLDockableFloater::LLDockableFloater(LLDockControl* dockControl,
const LLSD& key, const Params& params) :
LLFloater(key, params), mDockControl(dockControl), mUniqueDocking(true)
- , mOverlapsScreenChannel(false)
{
init(this);
mUseTongue = true;
@@ -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();