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 | |
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')
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 26 | ||||
-rw-r--r-- | linden/indra/newview/llinventoryview.h | 3 |
2 files changed, 20 insertions, 9 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 | { |
diff --git a/linden/indra/newview/llinventoryview.h b/linden/indra/newview/llinventoryview.h index 2650ed8..e098ac7 100644 --- a/linden/indra/newview/llinventoryview.h +++ b/linden/indra/newview/llinventoryview.h | |||
@@ -307,9 +307,10 @@ protected: | |||
307 | LLSaveFolderState* mSavedFolderState; | 307 | LLSaveFolderState* mSavedFolderState; |
308 | 308 | ||
309 | std::string mFilterText; | 309 | std::string mFilterText; |
310 | std::string mOldFilterText; | ||
310 | 311 | ||
311 | S32 mItemCount; | 312 | S32 mItemCount; |
312 | 313 | S32 mOldItemCount; | |
313 | 314 | ||
314 | // This container is used to hold all active inventory views. This | 315 | // This container is used to hold all active inventory views. This |
315 | // is here to support the inventory toggle show button. | 316 | // is here to support the inventory toggle show button. |