summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorSimon Linden <simon@lindenlab.com>2014-07-18 22:39:50 +0000
committerSimon Linden <simon@lindenlab.com>2014-07-18 22:39:50 +0000
commit7021288859036789dc268233cc1a3401d6082721 (patch)
tree2d6a4d9e87785a8bc236215e5e0102a553a0ee5f /indra/newview/llinventorypanel.cpp
parent7714c7679da7c6c28c3f3f09af6b586a680dc26c (diff)
parent19bc1ee671df2f89d990dfe8aadea1d9ea424e82 (diff)
Pull in viewer-lion to cut off DRTVWR-373
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rwxr-xr-xindra/newview/llinventorypanel.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index a4a85e2e8d..adfdfebae7 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,11 @@ void LLInventoryPanel::modelChanged(U32 mask)
}
}
}
+
+ if ("Recent Items" == getName())
+ {
+ getFilter().setModified();
+ }
}
LLUUID LLInventoryPanel::getRootFolderID()
@@ -1390,6 +1403,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;
}
@@ -1457,6 +1481,8 @@ public:
getFilter().setFilterCategoryTypes(getFilter().getFilterCategoryTypes() | (1ULL << LLFolderType::FT_INBOX));
}
+ /*virtual*/ void onVisibilityChange(BOOL new_visibility);
+
protected:
LLInventoryRecentItemsPanel (const Params&);
friend class LLUICtrlFactory;
@@ -1469,6 +1495,13 @@ LLInventoryRecentItemsPanel::LLInventoryRecentItemsPanel( const Params& params)
mInvFVBridgeBuilder = &RECENT_ITEMS_BUILDER;
}
+void LLInventoryRecentItemsPanel::onVisibilityChange(BOOL new_visibility)
+{
+ if(new_visibility)
+ {
+ getFilter().setModified();
+ }
+}
namespace LLInitParam
{
void TypeValues<LLFolderType::EType>::declareValues()