diff options
author | Richard Nelson <none@none> | 2010-09-27 09:46:20 -0700 |
---|---|---|
committer | Richard Nelson <none@none> | 2010-09-27 09:46:20 -0700 |
commit | ad440a68bb6a481f17ea8b0cb8f3cecf37502d51 (patch) | |
tree | b41c81b55f73b6ebd4ee0a14dd195c07d7ce2d40 /indra/llui/llview.h | |
parent | b25d969b61eb1e4f114ee0e632d1de9777780e9f (diff) | |
parent | 57b8571a8acd559b7a92c2d5ffbfe96b0c4b5b98 (diff) |
merge
Diffstat (limited to 'indra/llui/llview.h')
-rw-r--r-- | indra/llui/llview.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/indra/llui/llview.h b/indra/llui/llview.h index 6bcee98f26..e6e0a41962 100644 --- a/indra/llui/llview.h +++ b/indra/llui/llview.h @@ -461,12 +461,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); } ////////////////////////////////////////////// @@ -580,9 +576,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 @@ -649,7 +645,7 @@ template <class T> T* LLView::getChild(const std::string& name, BOOL recurse) co return NULL; } - getDefaultWidgetMap()[name] = result; + getDefaultWidgetContainer().addChild(result); } } return result; |