diff options
author | Monroe Linden <monroe@lindenlab.com> | 2010-12-02 14:33:42 -0800 |
---|---|---|
committer | Monroe Linden <monroe@lindenlab.com> | 2010-12-02 14:33:42 -0800 |
commit | 1e050c2ed87ae2093623fa4c66a69aeee1fb980c (patch) | |
tree | ff9bf66608dc3b9c4459daa68ec99a3065182aac /indra/llui/llview.h | |
parent | 36954908632d6f5366f6517023676c1bcd71aa17 (diff) | |
parent | d276950c8d4d53f9d5d6497d5a4a4582c499938a (diff) |
merge
Diffstat (limited to 'indra/llui/llview.h')
-rw-r--r-- | indra/llui/llview.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 33d345beff..a5d8e31640 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -116,7 +116,8 @@ public: visible, mouse_opaque, use_bounding_rect, - from_xui; + from_xui, + focus_root; Optional<S32> tab_group, default_tab_group; @@ -466,12 +467,8 @@ public: template <class T> T* getDefaultWidget(const std::string& name) const { - default_widget_map_t::const_iterator found_it = getDefaultWidgetMap().find(name); - if (found_it == getDefaultWidgetMap().end()) - { - return NULL; - } - return dynamic_cast<T*>(found_it->second); + LLView* widgetp = getDefaultWidgetContainer().findChildView(name); + return dynamic_cast<T*>(widgetp); } ////////////////////////////////////////////// @@ -585,9 +582,9 @@ private: typedef std::map<std::string, LLView*> default_widget_map_t; // allocate this map no demand, as it is rarely needed - mutable default_widget_map_t* mDefaultWidgets; + mutable LLView* mDefaultWidgets; - default_widget_map_t& getDefaultWidgetMap() const; + LLView& getDefaultWidgetContainer() const; public: // Depth in view hierarchy during rendering @@ -654,7 +651,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co return NULL; } - getDefaultWidgetMap()[name] = result; + getDefaultWidgetContainer().addChild(result); } } return result; |