summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-03-10 13:06:06 -0700
committerdolphin <dolphin@lindenlab.com>2014-03-10 13:06:06 -0700
commit34c12d009c232917732e6eeb452da7e76b2ee12e (patch)
tree847155313ac7588a23f3ee71d3ee8f3ab30580c9 /indra/newview/llpanelmaininventory.cpp
parent7b9817cbcc5acab58d9d4355984b429850bd3ef8 (diff)
parentcb91708332b8b8ddfe27808602ec5f43f11c24c2 (diff)
Merge
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rwxr-xr-xindra/newview/llpanelmaininventory.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 1ff0bfd091..68c22c12fd 100755
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -58,7 +58,7 @@
const std::string FILTERS_FILENAME("filters.xml");
-static LLRegisterPanelClassWrapper<LLPanelMainInventory> t_inventory("panel_main_inventory");
+static LLPanelInjector<LLPanelMainInventory> t_inventory("panel_main_inventory");
void on_file_loaded_for_save(BOOL success,
LLViewerFetchedTexture *src_vi,
@@ -574,13 +574,16 @@ void LLPanelMainInventory::draw()
void LLPanelMainInventory::updateItemcountText()
{
- // *TODO: Calling setlocale() on each frame may be inefficient.
- //LLLocale locale(LLStringUtil::getLocale());
- std::string item_count_string;
- LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
+ if(mItemCount != gInventory.getItemCount())
+ {
+ mItemCount = gInventory.getItemCount();
+ mItemCountString = "";
+ LLLocale locale(LLLocale::USER_LOCALE);
+ LLResMgr::getInstance()->getIntegerString(mItemCountString, mItemCount);
+ }
LLStringUtil::format_map_t string_args;
- string_args["[ITEM_COUNT]"] = item_count_string;
+ string_args["[ITEM_COUNT]"] = mItemCountString;
string_args["[FILTER]"] = getFilterText();
std::string text = "";