diff options
author | Armin Weatherwax | 2010-07-12 14:27:11 +0200 |
---|---|---|
committer | McCabe Maxsted | 2010-07-15 20:23:38 -0700 |
commit | c52a19085f03367a3a779b1191aac0cd57b5abb9 (patch) | |
tree | 61479c4c768616bbf8cca5232e536e26adbebd0f /linden/indra/newview/llinventoryview.cpp | |
parent | Fixed 'Home' button missing from Web Browser (diff) | |
download | meta-impy-c52a19085f03367a3a779b1191aac0cd57b5abb9.zip meta-impy-c52a19085f03367a3a779b1191aac0cd57b5abb9.tar.gz meta-impy-c52a19085f03367a3a779b1191aac0cd57b5abb9.tar.bz2 meta-impy-c52a19085f03367a3a779b1191aac0cd57b5abb9.tar.xz |
fix: don't change inventory floater title continously without need (take2)
Diffstat (limited to 'linden/indra/newview/llinventoryview.cpp')
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index e6041c4..a001d65 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -674,14 +674,24 @@ void LLInventoryView::draw() | |||
674 | { | 674 | { |
675 | if (LLInventoryModel::isEverythingFetched()) | 675 | if (LLInventoryModel::isEverythingFetched()) |
676 | { | 676 | { |
677 | LLLocale locale(LLLocale::USER_LOCALE); | 677 | S32 item_count = gInventory.getItemCount(); |
678 | std::ostringstream title; | 678 | |
679 | title << "Inventory"; | 679 | //don't let llfloater work more than necessary |
680 | std::string item_count_string; | 680 | if (item_count != mOldItemCount || mOldFilterText != mFilterText) |
681 | LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); | 681 | { |
682 | title << " (" << item_count_string << " items)"; | 682 | LLLocale locale(LLLocale::USER_LOCALE); |
683 | title << mFilterText; | 683 | std::ostringstream title; |
684 | setTitle(title.str()); | 684 | title << "Inventory"; //*TODO: make translatable |
685 | std::string item_count_string; | ||
686 | LLResMgr::getInstance()->getIntegerString(item_count_string, item_count); | ||
687 | title << " (" << item_count_string << " items)"; | ||
688 | title << mFilterText; | ||
689 | setTitle(title.str()); | ||
690 | } | ||
691 | |||
692 | mOldFilterText = mFilterText; | ||
693 | mOldItemCount = item_count; | ||
694 | |||
685 | } | 695 | } |
686 | if (mActivePanel && mSearchEditor) | 696 | if (mActivePanel && mSearchEditor) |
687 | { | 697 | { |