Include folders in total inventory count

meow-7.2.2
Ansariel 2017-12-01 19:25:34 +01:00
parent 8202e957cc
commit bdbb6d7fc8
2 changed files with 9 additions and 6 deletions

View File

@ -3493,10 +3493,7 @@ void LLInventoryModel::emptyFolderType(const std::string notification, LLFolderT
LLInventoryModel::item_array_t items;
const LLUUID trash_id = findCategoryUUIDForType(preferred_type);
gInventory.collectDescendents(trash_id, cats, items, LLInventoryModel::INCLUDE_TRASH); //All descendants
// <FS:Ansariel> FIRE-21630: Make item count match counting method for inventory (don't include folders)
//S32 item_count = items.size() + cats.size();
S32 item_count = items.size();
// </FS:Ansariel>
S32 item_count = items.size() + cats.size();
args["COUNT"] = item_count;
}
LLNotificationsUtil::add(notification, args, LLSD(),

View File

@ -1008,9 +1008,15 @@ void LLPanelMainInventory::draw()
void LLPanelMainInventory::updateItemcountText()
{
if(mItemCount != gInventory.getItemCount())
// <FS:Ansariel> Include folders in inventory count
//if(mItemCount != gInventory.getItemCount())
//{
// mItemCount = gInventory.getItemCount();
S32 new_count = gInventory.getItemCount() + gInventory.getCategoryCount();
if(mItemCount != new_count)
{
mItemCount = gInventory.getItemCount();
mItemCount = new_count;
// </FS:Ansariel>
mItemCountString = "";
// <FS:Ansariel> Use user-default locale from operating system
//LLLocale locale(LLLocale::USER_LOCALE);