diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index f8fb439..927d05c 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -491,7 +491,10 @@ 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 | mOldItemCount(-1), | ||
496 | mOldFilterText(""), | ||
497 | mFilterText("") | ||
495 | //LLHandle<LLFloater> mFinderHandle takes care of its own initialization | 498 | //LLHandle<LLFloater> mFinderHandle takes care of its own initialization |
496 | { | 499 | { |
497 | init(inventory); | 500 | init(inventory); |
@@ -681,12 +684,12 @@ LLInventoryView::~LLInventoryView( void ) | |||
681 | 684 | ||
682 | void LLInventoryView::draw() | 685 | void LLInventoryView::draw() |
683 | { | 686 | { |
684 | if (LLInventoryModel::isEverythingFetched()) | 687 | if (!LLInventoryModel::backgroundFetchActive()) |
685 | { | 688 | { |
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 > mOldItemCount || 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 | mOldItemCount = item_count; | ||
705 | } | ||
704 | } | 706 | } |
705 | if (mActivePanel && mSearchEditor) | 707 | if (mActivePanel && mSearchEditor) |
706 | { | 708 | { |
@@ -798,6 +800,8 @@ void LLInventoryView::setVisible( BOOL visible ) | |||
798 | // Destroy all but the last floater, which is made invisible. | 800 | // Destroy all but the last floater, which is made invisible. |
799 | void LLInventoryView::onClose(bool app_quitting) | 801 | void LLInventoryView::onClose(bool app_quitting) |
800 | { | 802 | { |
803 | mOldItemCount = 0; | ||
804 | mOldFilterText = ""; | ||
801 | // S32 count = sActiveViews.count(); | 805 | // S32 count = sActiveViews.count(); |
802 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | 806 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) |
803 | // See LLInventoryView::closeAll() on why we're doing it this way | 807 | // See LLInventoryView::closeAll() on why we're doing it this way |
@@ -889,6 +893,12 @@ void LLInventoryView::changed(U32 mask) | |||
889 | } | 893 | } |
890 | else | 894 | else |
891 | { | 895 | { |
896 | // This is here because it gets called on login even when it shouldn't -- MC | ||
897 | LLLocale locale(LLLocale::USER_LOCALE); | ||
898 | std::string item_count_string; | ||
899 | LLResMgr::getInstance()->getIntegerString(item_count_string, gInventory.getItemCount()); | ||
900 | title << " (" << item_count_string << " items)"; | ||
901 | |||
892 | gSavedPerAccountSettings.setS32("InventoryPreviousCount", gInventory.getItemCount()); | 902 | gSavedPerAccountSettings.setS32("InventoryPreviousCount", gInventory.getItemCount()); |
893 | } | 903 | } |
894 | title << mFilterText; | 904 | title << mFilterText; |