summaryrefslogtreecommitdiff
path: root/indra/newview/llsidetray.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2009-12-08 15:27:20 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2009-12-08 15:27:20 +0200
commitd87c492d721c448ce8676dc568731ae389df46f3 (patch)
tree209c898da569532711fb6a981e548c3948caa279 /indra/newview/llsidetray.cpp
parent75993e09bf90e8a9d380192268cd6e0e149a70e2 (diff)
parent06429722acae74a856589ccf92d31c2e10b0832d (diff)
Merge from default branch.
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llsidetray.cpp')
-rw-r--r--indra/newview/llsidetray.cpp26
1 files changed, 25 insertions, 1 deletions
diff --git a/indra/newview/llsidetray.cpp b/indra/newview/llsidetray.cpp
index 9333465052..a1af2e5411 100644
--- a/indra/newview/llsidetray.cpp
+++ b/indra/newview/llsidetray.cpp
@@ -128,6 +128,7 @@ public:
void onOpen (const LLSD& key);
+ LLPanel *getPanel();
private:
std::string mTabTitle;
std::string mImage;
@@ -199,11 +200,17 @@ void LLSideTrayTab::reshape (S32 width, S32 height, BOOL called_from_parent )
void LLSideTrayTab::onOpen (const LLSD& key)
{
- LLPanel* panel = dynamic_cast<LLPanel*>(mMainPanel);
+ LLPanel *panel = getPanel();
if(panel)
panel->onOpen(key);
}
+LLPanel* LLSideTrayTab::getPanel()
+{
+ LLPanel* panel = dynamic_cast<LLPanel*>(mMainPanel);
+ return panel;
+}
+
LLSideTrayTab* LLSideTrayTab::createInstance ()
{
LLSideTrayTab::Params tab_params;
@@ -653,6 +660,23 @@ LLPanel* LLSideTray::getPanel (const std::string& panel_name)
return NULL;
}
+LLPanel* LLSideTray::getActivePanel()
+{
+ if (mActiveTab && !mCollapsed)
+ {
+ return mActiveTab->getPanel();
+ }
+ return NULL;
+}
+
+bool LLSideTray::isPanelActive(const std::string& panel_name)
+{
+ LLPanel *panel = getActivePanel();
+ if (!panel) return false;
+ return (panel->getName() == panel_name);
+}
+
+
// *TODO: Eliminate magic constants.
static const S32 fake_offset = 132;
static const S32 fake_top_offset = 18;