summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2011-09-13 14:26:02 -0700
committerLeslie Linden <leslie@lindenlab.com>2011-09-13 14:26:02 -0700
commit781fded069d877ea9c07d5e5077178f65ef82e7a (patch)
treeb3567a63e1c933357f527c1814452a44bdf0d2ae
parent201d0659192977071ff0fc2219a28ecbc3025171 (diff)
EXP-1010 FIX -- Received Items panel scroll snaps to current selection when Direct Delivery folders with a large # of items are being delivered from Marketplace
* Updated the inventory filter isNotDefault() function to properly check the filter types and filter links flags against the default filter ops. * Updated the inbox and outbox to mark their date sort order as the default. Reviewed by Leyla.
-rw-r--r--indra/newview/llinventoryfilter.cpp24
-rw-r--r--indra/newview/llpanelmarketplaceinbox.cpp1
-rw-r--r--indra/newview/llpanelmarketplaceoutbox.cpp5
3 files changed, 19 insertions, 11 deletions
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index d6278a5fda..516b47e616 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -256,16 +256,20 @@ std::string::size_type LLInventoryFilter::getStringMatchOffset() const
// has user modified default filter params?
BOOL LLInventoryFilter::isNotDefault() const
{
- return mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes
- || mFilterOps.mFilterCategoryTypes != mDefaultFilterOps.mFilterCategoryTypes
- || mFilterOps.mFilterWearableTypes != mDefaultFilterOps.mFilterWearableTypes
- || mFilterOps.mFilterTypes != FILTERTYPE_OBJECT
- || mFilterOps.mFilterLinks != FILTERLINK_INCLUDE_LINKS
- || mFilterSubString.size()
- || mFilterOps.mPermissions != mDefaultFilterOps.mPermissions
- || mFilterOps.mMinDate != mDefaultFilterOps.mMinDate
- || mFilterOps.mMaxDate != mDefaultFilterOps.mMaxDate
- || mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo;
+ BOOL not_default = FALSE;
+
+ not_default |= (mFilterOps.mFilterObjectTypes != mDefaultFilterOps.mFilterObjectTypes);
+ not_default |= (mFilterOps.mFilterCategoryTypes != mDefaultFilterOps.mFilterCategoryTypes);
+ not_default |= (mFilterOps.mFilterWearableTypes != mDefaultFilterOps.mFilterWearableTypes);
+ not_default |= (mFilterOps.mFilterTypes != mDefaultFilterOps.mFilterTypes);
+ not_default |= (mFilterOps.mFilterLinks != mDefaultFilterOps.mFilterLinks);
+ not_default |= (mFilterSubString.size());
+ not_default |= (mFilterOps.mPermissions != mDefaultFilterOps.mPermissions);
+ not_default |= (mFilterOps.mMinDate != mDefaultFilterOps.mMinDate);
+ not_default |= (mFilterOps.mMaxDate != mDefaultFilterOps.mMaxDate);
+ not_default |= (mFilterOps.mHoursAgo != mDefaultFilterOps.mHoursAgo);
+
+ return not_default;
}
BOOL LLInventoryFilter::isActive() const
diff --git a/indra/newview/llpanelmarketplaceinbox.cpp b/indra/newview/llpanelmarketplaceinbox.cpp
index 4ea2ea24a1..0579ecbb90 100644
--- a/indra/newview/llpanelmarketplaceinbox.cpp
+++ b/indra/newview/llpanelmarketplaceinbox.cpp
@@ -97,6 +97,7 @@ LLInventoryPanel * LLPanelMarketplaceInbox::setupInventoryPanel()
// Set the sort order newest to oldest
mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
+ mInventoryPanel->getFilter()->markDefault();
// Set selection callback for proper update of inventory status buttons
mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceInbox::onSelectionChange, this));
diff --git a/indra/newview/llpanelmarketplaceoutbox.cpp b/indra/newview/llpanelmarketplaceoutbox.cpp
index 839369bffe..73fb92ff72 100644
--- a/indra/newview/llpanelmarketplaceoutbox.cpp
+++ b/indra/newview/llpanelmarketplaceoutbox.cpp
@@ -117,8 +117,11 @@ LLInventoryPanel * LLPanelMarketplaceOutbox::setupInventoryPanel()
LLRect inventory_placeholder_rect = outbox_inventory_placeholder->getRect();
mInventoryPanel->setShape(inventory_placeholder_rect);
- // Set the sort order newest to oldest, and a selection change callback
+ // Set the sort order newest to oldest
mInventoryPanel->setSortOrder(LLInventoryFilter::SO_DATE);
+ mInventoryPanel->getFilter()->markDefault();
+
+ // Set selection callback for proper update of inventory status buttons
mInventoryPanel->setSelectCallback(boost::bind(&LLPanelMarketplaceOutbox::onSelectionChange, this));
// Set up the note to display when the outbox is empty