MAINT-3471 FIXED Set USER_LOCALE when updating item count.

Mnikolenko ProductEngine 2013-11-21 12:37:26 +02:00
parent 852d237370
commit 364bb0c13e
2 changed files with 10 additions and 5 deletions

View File

@ -864,13 +864,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 = "";

View File

@ -147,6 +147,8 @@ private:
LLSaveFolderState* mSavedFolderState;
std::string mFilterText;
std::string mFilterSubString;
S32 mItemCount;
std::string mItemCountString;
LLTextBox* mItemcountText;
// ## Zi: Filter dropdown