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.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index 6a5b475134..3d8670fef2 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -57,6 +57,7 @@ LLDockableFloater::LLDockableFloater(LLDockControl* dockControl,
, mOverlapsScreenChannel(false)
{
init(this);
+ mUseTongue = true;
}
LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, bool uniqueDocking,
@@ -64,6 +65,14 @@ LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, bool uniqueDock
LLFloater(key, params), mDockControl(dockControl), mUniqueDocking(uniqueDocking)
{
init(this);
+ mUseTongue = true;
+}
+
+LLDockableFloater::LLDockableFloater(LLDockControl* dockControl, bool uniqueDocking,
+ bool useTongue, const LLSD& key, const Params& params) :
+ LLFloater(key, params), mDockControl(dockControl), mUseTongue(useTongue), mUniqueDocking(uniqueDocking)
+{
+ init(this);
}
LLDockableFloater::~LLDockableFloater()
@@ -86,7 +95,7 @@ void LLDockableFloater::toggleInstance(const LLSD& sdname)
LLDockableFloater* instance =
dynamic_cast<LLDockableFloater*> (LLFloaterReg::findInstance(name));
// if floater closed or docked
- if (instance == NULL || instance != NULL && instance->isDocked())
+ if (instance == NULL || (instance && instance->isDocked()))
{
LLFloaterReg::toggleInstance(name, key);
// restore button toggle state
@@ -137,7 +146,7 @@ void LLDockableFloater::setVisible(BOOL visible)
if (visible)
{
- LLFloater::setFrontmost(TRUE);
+ LLFloater::setFrontmost(getAutoFocus());
}
LLFloater::setVisible(visible);
}
@@ -193,10 +202,6 @@ void LLDockableFloater::setDocked(bool docked, bool pop_on_undock)
translate(0, UNDOCK_LEAP_HEIGHT);
}
}
- else
- {
- docked = false;
- }
LLFloater::setDocked(docked, pop_on_undock);
}
@@ -217,7 +222,7 @@ void LLDockableFloater::draw()
void LLDockableFloater::setDockControl(LLDockControl* dockControl)
{
mDockControl.reset(dockControl);
- setDocked(mDockControl.get() != NULL && mDockControl.get()->isDockVisible());
+ setDocked(isDocked());
}
const LLUIImagePtr& LLDockableFloater::getDockTongue()