FIRE-11103: Fix empty folders being shown in worn inventory panel
parent
7a1891920d
commit
cb044d9981
|
|
@ -355,11 +355,14 @@ bool LLInventoryFilter::checkAgainstFilterType(const LLFolderViewModelItemInvent
|
|||
// Pass if this item is worn (hiding COF and Outfits folders)
|
||||
if (filterTypes & FILTERTYPE_WORN)
|
||||
{
|
||||
if (!object) return FALSE;
|
||||
LLUUID cat_id = object->getParentUUID();
|
||||
const LLViewerInventoryCategory *cat = gInventory.getCategory(cat_id);
|
||||
return !LLAppearanceMgr::instance().getIsInCOF(object_id)
|
||||
&& (!cat || cat->getPreferredType() != LLFolderType::FT_OUTFIT)
|
||||
if (!object)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
const LLUUID& cat_id = object->getParentUUID();
|
||||
const LLViewerInventoryCategory* cat = gInventory.getCategory(cat_id);
|
||||
return !LLAppearanceMgr::instance().getIsInCOF(object_id) // Not a link in COF
|
||||
&& (!cat || cat->getPreferredType() != LLFolderType::FT_OUTFIT) // Not a link in an outfit folder
|
||||
&& get_is_item_worn(object_id);
|
||||
}
|
||||
// </FS>
|
||||
|
|
@ -1173,6 +1176,7 @@ LLInventoryFilter& LLInventoryFilter::operator=( const LLInventoryFilter& othe
|
|||
setFilterPermissions(other.getFilterPermissions());
|
||||
setFilterSubString(other.getFilterSubString());
|
||||
setDateRangeLastLogoff(other.isSinceLogoff());
|
||||
setFilterWorn(other.getFilterWorn());
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ public:
|
|||
U64 getFilterLinks() const;
|
||||
|
||||
void setFilterWorn(BOOL sl);
|
||||
BOOL getFilterWorn() { return mFilterOps.mFilterTypes & FILTERTYPE_WORN; }
|
||||
BOOL getFilterWorn() const { return mFilterOps.mFilterTypes & FILTERTYPE_WORN; }
|
||||
|
||||
// +-------------------------------------------------------------------+
|
||||
// + Execution And Results
|
||||
|
|
|
|||
|
|
@ -520,6 +520,13 @@ void LLInventoryPanel::modelChanged(U32 mask)
|
|||
|
||||
view_item->refresh();
|
||||
}
|
||||
// <FS:Ansariel> FIRE-11103: Fix empty folders being shown in worn inventory panel
|
||||
LLFolderViewFolder* parent = view_item->getParentFolder();
|
||||
if(parent)
|
||||
{
|
||||
parent->getViewModelItem()->dirtyDescendantsFilter();
|
||||
}
|
||||
// </FS:Ansariel>
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -226,8 +226,9 @@ BOOL LLPanelMainInventory::postBuild()
|
|||
worn_items_panel->setWorn(TRUE);
|
||||
worn_items_panel->setSortOrder(gSavedSettings.getU32(LLInventoryPanel::DEFAULT_SORT_ORDER));
|
||||
worn_items_panel->setShowFolderState(LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS);
|
||||
worn_items_panel->getFilter().setFilterObjectTypes(0xffffffff - (0x1 << LLInventoryType::IT_GESTURE));
|
||||
worn_items_panel->getFilter().markDefault();
|
||||
LLInventoryFilter& worn_filter = worn_items_panel->getFilter();
|
||||
worn_filter.setFilterObjectTypes(worn_filter.getFilterObjectTypes() & ~(0x1 << LLInventoryType::IT_GESTURE | 0x1 << LLInventoryType::IT_CATEGORY));
|
||||
worn_filter.markDefault();
|
||||
|
||||
// <FS:ND> Do not go all crazy and recurse through the whole inventory
|
||||
// worn_items_panel->openAllFolders();
|
||||
|
|
|
|||
Loading…
Reference in New Issue