summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-05 15:36:32 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2014-09-05 15:36:32 -0400
commit0621810ab1060e615f7464b0b4d1407a5abf144d (patch)
treedb461db24d4bcae9293d6167edb49955feb41bb1 /indra/newview/llinventorypanel.cpp
parentdeddf0f3d97ed1ab6c8dc9f1592c5e4c4a4a273a (diff)
parentc053dbe02c301b92c151eb835f6c770b61a46859 (diff)
merge
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rwxr-xr-xindra/newview/llinventorypanel.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index a4a85e2e8d..ce7d4f50ad 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -336,7 +336,9 @@ LLInventoryFilter& LLInventoryPanel::getFilter()
void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType filter_type)
{
if (filter_type == LLInventoryFilter::FILTERTYPE_OBJECT)
+ {
getFilter().setFilterObjectTypes(types);
+ }
if (filter_type == LLInventoryFilter::FILTERTYPE_CATEGORY)
getFilter().setFilterCategoryTypes(types);
}
@@ -581,6 +583,22 @@ void LLInventoryPanel::modelChanged(U32 mask)
}
}
}
+
+ if (mask & (LLInventoryObserver::STRUCTURE | LLInventoryObserver::REMOVE))
+ {
+ // STRUCTURE and REMOVE model changes usually fail to update (clean)
+ // mMostFilteredDescendantGeneration of parent folder and dirtyFilter()
+ // is not sufficient for successful filter update, so we need to check
+ // all already passed element over again to remove obsolete elements.
+ // New items or moved items should be sufficiently covered by
+ // dirtyFilter().
+ LLInventoryFilter& filter = getFilter();
+ if (filter.getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE
+ || filter.isNotDefault())
+ {
+ filter.setModified(LLFolderViewFilter::FILTER_MORE_RESTRICTIVE);
+ }
+ }
}
LLUUID LLInventoryPanel::getRootFolderID()
@@ -1390,6 +1408,17 @@ BOOL LLInventoryPanel::handleKeyHere( KEY key, MASK mask )
// Open selected items if enter key hit on the inventory panel
if (mask == MASK_NONE)
{
+ //Don't allow attaching or opening items from Merchant Outbox
+ LLFolderViewItem* folder_item = mFolderRoot.get()->getCurSelectedItem();
+ if(folder_item)
+ {
+ LLInvFVBridge* bridge = (LLInvFVBridge*)folder_item->getViewModelItem();
+ if(bridge && bridge->isOutboxFolder() && (bridge->getInventoryType() != LLInventoryType::IT_CATEGORY))
+ {
+ return handled;
+ }
+ }
+
LLInventoryAction::doToSelected(mInventory, mFolderRoot.get(), "open");
handled = TRUE;
}