summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltransientdockablefloater.cpp3
-rw-r--r--indra/newview/lltransientfloatermgr.cpp6
-rw-r--r--indra/newview/lltransientfloatermgr.h7
3 files changed, 14 insertions, 2 deletions
diff --git a/indra/newview/lltransientdockablefloater.cpp b/indra/newview/lltransientdockablefloater.cpp
index b830498cb0..c9bfe178ce 100644
--- a/indra/newview/lltransientdockablefloater.cpp
+++ b/indra/newview/lltransientdockablefloater.cpp
@@ -39,9 +39,10 @@
LLTransientDockableFloater::LLTransientDockableFloater(LLDockControl* dockControl, bool uniqueDocking,
const LLSD& key, const Params& params) :
- LLDockableFloater(dockControl, uniqueDocking, key, params), LLTransientFloater(this)
+ LLDockableFloater(dockControl, uniqueDocking, key, params)
{
LLTransientFloaterMgr::getInstance()->registerTransientFloater(this);
+ LLTransientFloater::init(this);
}
LLTransientDockableFloater::~LLTransientDockableFloater()
diff --git a/indra/newview/lltransientfloatermgr.cpp b/indra/newview/lltransientfloatermgr.cpp
index f474f47eb7..8f1a738453 100644
--- a/indra/newview/lltransientfloatermgr.cpp
+++ b/indra/newview/lltransientfloatermgr.cpp
@@ -139,3 +139,9 @@ void LLTransientFloaterMgr::leftMouseClickCallback(S32 x, S32 y,
}
}
+void LLTransientFloater::init(LLFloater* thiz)
+{
+ // used since LLTransientFloater(this) can't be used in descendant constructor parameter initialization.
+ mFloater = thiz;
+}
+
diff --git a/indra/newview/lltransientfloatermgr.h b/indra/newview/lltransientfloatermgr.h
index 95eba666a0..aecc5a505d 100644
--- a/indra/newview/lltransientfloatermgr.h
+++ b/indra/newview/lltransientfloatermgr.h
@@ -75,8 +75,13 @@ private:
*/
class LLTransientFloater
{
+protected:
+ /**
+ * Class initialization method.
+ * Should be called from descendant constructor.
+ */
+ void init(LLFloater* thiz);
public:
- LLTransientFloater(LLFloater* floater) : mFloater(floater) {}
virtual LLTransientFloaterMgr::ETransientGroup getGroup() = 0;
bool isTransientDocked() { return mFloater->isDocked(); };
void setTransientVisible(BOOL visible) {mFloater->setVisible(visible); }