diff options
author | Oz Linden <oz@lindenlab.com> | 2014-08-13 17:58:01 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2014-08-13 17:58:01 -0400 |
commit | 383edf8015743becc37650ab018a112b9ff347b1 (patch) | |
tree | 1e9a33f1517c6fff3416f5426de525628f1d29c2 /indra/newview/llinventorypanel.cpp | |
parent | d56958e68934e673195ec2966e0a3c20dac7fb41 (diff) | |
parent | 06b605b8666f2336e77126f8ff47765115c08a27 (diff) |
merge changes for MAINT-4356
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rwxr-xr-x | indra/newview/llinventorypanel.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index a4a85e2e8d..32e5675f5e 100755 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -336,7 +336,15 @@ LLInventoryFilter& LLInventoryPanel::getFilter() void LLInventoryPanel::setFilterTypes(U64 types, LLInventoryFilter::EFilterType filter_type) { if (filter_type == LLInventoryFilter::FILTERTYPE_OBJECT) + { + //Don't show folder without recent item in it + if ("Recent Items" == getName()) + { + types &= ~(0x1 << LLInventoryType::IT_CATEGORY); + } + getFilter().setFilterObjectTypes(types); + } if (filter_type == LLInventoryFilter::FILTERTYPE_CATEGORY) getFilter().setFilterCategoryTypes(types); } @@ -581,6 +589,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 +1414,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; } |