diff options
author | Merov Linden <merov@lindenlab.com> | 2014-09-28 21:40:32 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-09-28 21:40:32 -0700 |
commit | 4b80a5ed059d91bc37558db8ed664365e39d21d6 (patch) | |
tree | 55cfddc381448a72b54c03347deabada9687f629 /indra/newview/llinventorypanel.cpp | |
parent | 896f48229e577b1bcf94f2cb80d73a6bf1a9330c (diff) | |
parent | 499f5aa9a4b46d61ee94b26d5c86bc032766af70 (diff) |
Pull merge from lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rwxr-xr-x | indra/newview/llinventorypanel.cpp | 29 |
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; } |