aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llinventoryview.cpp
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-06-08 23:23:35 -0700
committerMcCabe Maxsted2011-06-08 23:23:35 -0700
commit306cce10bd5fe99ab7b50fff9fc468e81fc7ecb2 (patch)
treef158e561ecb9602fcdc5d257db0c10ff12a188de /linden/indra/newview/llinventoryview.cpp
parentRe-enabled fetchinventoryonlogin setting and renamed it to fetchinventoryonlo... (diff)
downloadmeta-impy-306cce10bd5fe99ab7b50fff9fc468e81fc7ecb2.zip
meta-impy-306cce10bd5fe99ab7b50fff9fc468e81fc7ecb2.tar.gz
meta-impy-306cce10bd5fe99ab7b50fff9fc468e81fc7ecb2.tar.bz2
meta-impy-306cce10bd5fe99ab7b50fff9fc468e81fc7ecb2.tar.xz
Fixed inventory window not showing item count on login when the full cache is loaded
Diffstat (limited to 'linden/indra/newview/llinventoryview.cpp')
-rw-r--r--linden/indra/newview/llinventoryview.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp
index ec14cb3..f2fe921 100644
--- a/linden/indra/newview/llinventoryview.cpp
+++ b/linden/indra/newview/llinventoryview.cpp
@@ -491,7 +491,9 @@ LLInventoryView::LLInventoryView(const std::string& name,
491 LLFloater(name, rect, std::string("Inventory"), RESIZE_YES, 491 LLFloater(name, rect, std::string("Inventory"), RESIZE_YES,
492 INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP, 492 INV_MIN_WIDTH, INV_MIN_HEIGHT, DRAG_ON_TOP,
493 MINIMIZE_NO, CLOSE_YES), 493 MINIMIZE_NO, CLOSE_YES),
494 mActivePanel(NULL) 494 mActivePanel(NULL),
495 mOldFilterText(""),
496 mFilterText("")
495 //LLHandle<LLFloater> mFinderHandle takes care of its own initialization 497 //LLHandle<LLFloater> mFinderHandle takes care of its own initialization
496{ 498{
497 init(inventory); 499 init(inventory);
@@ -683,10 +685,11 @@ void LLInventoryView::draw()
683{ 685{
684 if (!LLInventoryModel::backgroundFetchActive()) 686 if (!LLInventoryModel::backgroundFetchActive())
685 { 687 {
688 static S32 old_item_count = 0;
686 S32 item_count = gInventory.getItemCount(); 689 S32 item_count = gInventory.getItemCount();
687 690
688 //don't let llfloater work more than necessary 691 //don't let llfloater work more than necessary
689 if (item_count != mOldItemCount || mOldFilterText != mFilterText) 692 if (item_count > old_item_count || mOldFilterText != mFilterText)
690 { 693 {
691 LLLocale locale(LLLocale::USER_LOCALE); 694 LLLocale locale(LLLocale::USER_LOCALE);
692 std::ostringstream title; 695 std::ostringstream title;
@@ -696,11 +699,10 @@ void LLInventoryView::draw()
696 title << " (" << item_count_string << " items)"; 699 title << " (" << item_count_string << " items)";
697 title << mFilterText; 700 title << mFilterText;
698 setTitle(title.str()); 701 setTitle(title.str());
699 }
700
701 mOldFilterText = mFilterText;
702 mOldItemCount = item_count;
703 702
703 mOldFilterText = mFilterText;
704 old_item_count = item_count;
705 }
704 } 706 }
705 if (mActivePanel && mSearchEditor) 707 if (mActivePanel && mSearchEditor)
706 { 708 {
@@ -889,6 +891,12 @@ void LLInventoryView::changed(U32 mask)
889 } 891 }
890 else 892 else
891 { 893 {
894 // This is here because it gets called on login even when it shouldn't -- MC
895 LLLocale locale(LLLocale::USER_LOCALE);
896 std::string item_count_string;
897 LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount());
898 title << " (" << item_count_string << " items)";
899
892 gSavedPerAccountSettings.setS32("InventoryPreviousCount", gInventory.getItemCount()); 900 gSavedPerAccountSettings.setS32("InventoryPreviousCount", gInventory.getItemCount());
893 } 901 }
894 title << mFilterText; 902 title << mFilterText;