From 54f29d25a9197365135b3344175d4173ba7f0d27 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 21 Nov 2013 12:37:26 +0200 Subject: MAINT-3471 FIXED Set USER_LOCALE when updating item count. --- indra/newview/llpanelmaininventory.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'indra/newview/llpanelmaininventory.cpp') 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 = ""; -- cgit v1.2.3 From e6c85c46c4e301c54391280f3e63765158ea1708 Mon Sep 17 00:00:00 2001 From: maksymsproductengine Date: Wed, 5 Feb 2014 20:45:09 +0200 Subject: MAINT-3555 crash in LLPanel::~LLPanel() on shutdown: - memory leaks fixing; --- indra/newview/llpanelmaininventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index bd173fadc7..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 t_inventory("panel_main_inventory"); +static LLPanelInjector t_inventory("panel_main_inventory"); void on_file_loaded_for_save(BOOL success, LLViewerFetchedTexture *src_vi, -- cgit v1.2.3