diff options
| author | Merov Linden <merov@lindenlab.com> | 2013-04-02 17:11:07 -0700 |
|---|---|---|
| committer | Merov Linden <merov@lindenlab.com> | 2013-04-02 17:11:07 -0700 |
| commit | e09959df0d51eb8f4d37719d2753d2016390b25b (patch) | |
| tree | 98277fcb8f77abe5d8aaee97472ce49575ef0a7b /indra/newview/llpanelmaininventory.cpp | |
| parent | c588f6be31a203f05fbd784b0270555c6e1d04d6 (diff) | |
CHUI-849 : WIP : Prevents Finding Widgets in highly used code by getting pointers to widgets in PostBuild
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
| -rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index d6535c88e9..53deded2f2 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -130,6 +130,8 @@ BOOL LLPanelMainInventory::postBuild() mFilterTabs = getChild<LLTabContainer>("inventory filter tabs"); mFilterTabs->setCommitCallback(boost::bind(&LLPanelMainInventory::onFilterSelected, this)); + mCounterCtrl = getChild<LLUICtrl>("ItemcountText"); + //panel->getFilter().markDefault(); // Set up the default inv. panel/filter settings. @@ -566,7 +568,7 @@ void LLPanelMainInventory::draw() void LLPanelMainInventory::updateItemcountText() { // *TODO: Calling setlocale() on each frame may be inefficient. - LLLocale locale(LLStringUtil::getLocale()); + //LLLocale locale(LLStringUtil::getLocale()); std::string item_count_string; LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); @@ -589,8 +591,7 @@ void LLPanelMainInventory::updateItemcountText() text = getString("ItemcountUnknown"); } - // *TODO: Cache the LLUICtrl* for the ItemcountText control - getChild<LLUICtrl>("ItemcountText")->setValue(text); + mCounterCtrl->setValue(text); } void LLPanelMainInventory::onFocusReceived() |
