diff options
| author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-11-21 12:37:26 +0200 | 
|---|---|---|
| committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2013-11-21 12:37:26 +0200 | 
| commit | 54f29d25a9197365135b3344175d4173ba7f0d27 (patch) | |
| tree | 5cae5e6c022b613f7f42885a3952312208085423 | |
| parent | cf0112d4c65e71ba4794174a1fe1ee9108ca75c9 (diff) | |
MAINT-3471  FIXED Set USER_LOCALE when updating item count.
| -rwxr-xr-x | indra/newview/llpanelmaininventory.cpp | 13 | ||||
| -rwxr-xr-x | indra/newview/llpanelmaininventory.h | 2 | 
2 files changed, 10 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 = ""; diff --git a/indra/newview/llpanelmaininventory.h b/indra/newview/llpanelmaininventory.h index fc8cc67c33..21f0ca0cae 100755 --- a/indra/newview/llpanelmaininventory.h +++ b/indra/newview/llpanelmaininventory.h @@ -131,6 +131,8 @@ private:  	LLSaveFolderState*			mSavedFolderState;  	std::string					mFilterText;  	std::string					mFilterSubString; +	S32							mItemCount; +	std::string 				mItemCountString;  	////////////////////////////////////////////////////////////////////////////////// | 
