summaryrefslogtreecommitdiff
path: root/indra/llui/llview.h
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-09-22 12:27:26 -0700
committerRichard Linden <none@none>2010-09-22 12:27:26 -0700
commitf8a17515f592a1d759ca2c79f80b2ed032af2ebe (patch)
treef79ba81ed36c1cbf64ff923763bc9331df2f12fe /indra/llui/llview.h
parent7648bb425ae106ce0268c7ff535b054de6f6a318 (diff)
EXP-109 WIP strip down main_view.xml
made menu keyboard access only work when menus are visible dummy widgets are now added with a parent view that is invisible popupview can now be default-built
Diffstat (limited to 'indra/llui/llview.h')
-rw-r--r--indra/llui/llview.h14
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;