summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorypanel.cpp
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2014-06-17 11:24:02 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2014-06-17 11:24:02 +0300
commit19560d1b7538accc58f61da94138d054207ea22d (patch)
tree35e777a3360b8c92767aa3c4172a83ac261970ec /indra/newview/llinventorypanel.cpp
parentdb977d6df80e975e7bc7e1e95a93b77dac3a5e6b (diff)
MAINT-1192 FIXED Don't show folder without recent item in it for "Recent" tab.
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rwxr-xr-xindra/newview/llinventorypanel.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index a4a85e2e8d..4cb724e9c4 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()
@@ -1457,6 +1470,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 +1484,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()