diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-09-28 22:44:58 +0100 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-09-28 22:44:58 +0100 |
commit | 443cf1f72e443c62c0ed92e629b040bb50dd7b58 (patch) | |
tree | 63a31ff19489c4fa4c1405d6c4bba6450fdc02ee /indra/newview/llsidetray.h | |
parent | b906a7a76aea1d06829237be3cb5336961f7dfce (diff) | |
parent | 0a938d395c6bde13ead4f789056e7f9067e4dbd0 (diff) |
merge storm-266
Diffstat (limited to 'indra/newview/llsidetray.h')
-rw-r--r-- | indra/newview/llsidetray.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llsidetray.h b/indra/newview/llsidetray.h index 4e79007c13..4c23a1920b 100644 --- a/indra/newview/llsidetray.h +++ b/indra/newview/llsidetray.h @@ -109,6 +109,22 @@ public: LLPanel* getPanel (const std::string& panel_name); LLPanel* getActivePanel (); bool isPanelActive (const std::string& panel_name); + + /* + * get the panel of given type T (don't show it or do anything else with it) + */ + template <typename T> + T* getPanel(const std::string& panel_name) + { + T* panel = dynamic_cast<T*>(getPanel(panel_name)); + if (!panel) + { + llwarns << "Child named \"" << panel_name << "\" of type " << typeid(T*).name() << " not found" << llendl; + return NULL; + } + return panel; + } + /* * get currently active tab */ |