diff options
| author | MaximB ProductEngine <mberezhnoy@productengine.com> | 2013-11-25 20:07:28 +0200 |
|---|---|---|
| committer | MaximB ProductEngine <mberezhnoy@productengine.com> | 2013-11-25 20:07:28 +0200 |
| commit | e28bd4612e2ce7760a13fde59580badb1cbaebd3 (patch) | |
| tree | 2b608225db86c68b7c696f18ec7f1abfda663c33 /indra/newview/llpanelmaininventory.cpp | |
| parent | cad40bee134d4bd55679dc928ff137ec71681830 (diff) | |
| parent | bae67dee23f399b0618c37332665210fddbf8f1b (diff) | |
merge
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
| -rwxr-xr-x | indra/newview/llpanelmaininventory.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 1ff0bfd091..bd173fadc7 100755 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -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 = ""; |
