diff options
author | McCabe Maxsted | 2011-06-09 00:20:51 -0700 |
---|---|---|
committer | McCabe Maxsted | 2011-06-09 00:20:51 -0700 |
commit | f67f38e4c9363e65415d3a6405e2f6488a13653e (patch) | |
tree | 77eba7d563fee2a9a28203fe91b3e9d21a2815be /linden/indra | |
parent | Fix for button labels in case there's ever a conflict between a disabled sele... (diff) | |
download | meta-impy-f67f38e4c9363e65415d3a6405e2f6488a13653e.zip meta-impy-f67f38e4c9363e65415d3a6405e2f6488a13653e.tar.gz meta-impy-f67f38e4c9363e65415d3a6405e2f6488a13653e.tar.bz2 meta-impy-f67f38e4c9363e65415d3a6405e2f6488a13653e.tar.xz |
Fixed inventory count being reset when the inventory window's closed/reopened
Diffstat (limited to 'linden/indra')
-rw-r--r-- | linden/indra/newview/llinventoryview.cpp | 8 | ||||
-rw-r--r-- | linden/indra/newview/llinventoryview.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/linden/indra/newview/llinventoryview.cpp b/linden/indra/newview/llinventoryview.cpp index f2fe921..927d05c 100644 --- a/linden/indra/newview/llinventoryview.cpp +++ b/linden/indra/newview/llinventoryview.cpp | |||
@@ -492,6 +492,7 @@ LLInventoryView::LLInventoryView(const std::string& name, | |||
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), | ||
495 | mOldFilterText(""), | 496 | mOldFilterText(""), |
496 | mFilterText("") | 497 | mFilterText("") |
497 | //LLHandle<LLFloater> mFinderHandle takes care of its own initialization | 498 | //LLHandle<LLFloater> mFinderHandle takes care of its own initialization |
@@ -685,11 +686,10 @@ void LLInventoryView::draw() | |||
685 | { | 686 | { |
686 | if (!LLInventoryModel::backgroundFetchActive()) | 687 | if (!LLInventoryModel::backgroundFetchActive()) |
687 | { | 688 | { |
688 | static S32 old_item_count = 0; | ||
689 | S32 item_count = gInventory.getItemCount(); | 689 | S32 item_count = gInventory.getItemCount(); |
690 | 690 | ||
691 | //don't let llfloater work more than necessary | 691 | //don't let llfloater work more than necessary |
692 | if (item_count > old_item_count || mOldFilterText != mFilterText) | 692 | if (item_count > mOldItemCount || mOldFilterText != mFilterText) |
693 | { | 693 | { |
694 | LLLocale locale(LLLocale::USER_LOCALE); | 694 | LLLocale locale(LLLocale::USER_LOCALE); |
695 | std::ostringstream title; | 695 | std::ostringstream title; |
@@ -701,7 +701,7 @@ void LLInventoryView::draw() | |||
701 | setTitle(title.str()); | 701 | setTitle(title.str()); |
702 | 702 | ||
703 | mOldFilterText = mFilterText; | 703 | mOldFilterText = mFilterText; |
704 | old_item_count = item_count; | 704 | mOldItemCount = item_count; |
705 | } | 705 | } |
706 | } | 706 | } |
707 | if (mActivePanel && mSearchEditor) | 707 | if (mActivePanel && mSearchEditor) |
@@ -800,6 +800,8 @@ void LLInventoryView::setVisible( BOOL visible ) | |||
800 | // Destroy all but the last floater, which is made invisible. | 800 | // Destroy all but the last floater, which is made invisible. |
801 | void LLInventoryView::onClose(bool app_quitting) | 801 | void LLInventoryView::onClose(bool app_quitting) |
802 | { | 802 | { |
803 | mOldItemCount = 0; | ||
804 | mOldFilterText = ""; | ||
803 | // S32 count = sActiveViews.count(); | 805 | // S32 count = sActiveViews.count(); |
804 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) | 806 | // [RLVa:KB] - Checked: 2009-07-10 (RLVa-1.0.0g) |
805 | // See LLInventoryView::closeAll() on why we're doing it this way | 807 | // See LLInventoryView::closeAll() on why we're doing it this way |
diff --git a/linden/indra/newview/llinventoryview.h b/linden/indra/newview/llinventoryview.h index e499113..cc5106d 100644 --- a/linden/indra/newview/llinventoryview.h +++ b/linden/indra/newview/llinventoryview.h | |||
@@ -315,6 +315,7 @@ protected: | |||
315 | std::string mOldFilterText; | 315 | std::string mOldFilterText; |
316 | 316 | ||
317 | S32 mItemCount; | 317 | S32 mItemCount; |
318 | S32 mOldItemCount; | ||
318 | 319 | ||
319 | // This container is used to hold all active inventory views. This | 320 | // This container is used to hold all active inventory views. This |
320 | // is here to support the inventory toggle show button. | 321 | // is here to support the inventory toggle show button. |