summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
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 07a1c19639..6926fa9268 100755
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -342,7 +342,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);
}
@@ -593,6 +595,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()
@@ -1427,6 +1445,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;
}