Include folders in total inventory count

Fri, 01 Dec 2017 19:25:34 +0100

author
Ansariel
date
Fri, 01 Dec 2017 19:25:34 +0100
changeset 53525
409064780985
parent 53524
29ac67093911
child 53526
1f39e8e1b942

Include folders in total inventory count

indra/newview/llinventorymodel.cpp file | annotate | diff | revisions
indra/newview/llpanelmaininventory.cpp file | annotate | diff | revisions
     1.1 --- a/indra/newview/llinventorymodel.cpp	Fri Dec 01 14:34:40 2017 +0100
     1.2 +++ b/indra/newview/llinventorymodel.cpp	Fri Dec 01 19:25:34 2017 +0100
     1.3 @@ -3493,10 +3493,7 @@
     1.4  			LLInventoryModel::item_array_t items;
     1.5  			const LLUUID trash_id = findCategoryUUIDForType(preferred_type);
     1.6  			gInventory.collectDescendents(trash_id, cats, items, LLInventoryModel::INCLUDE_TRASH); //All descendants
     1.7 -			// <FS:Ansariel> FIRE-21630: Make item count match counting method for inventory (don't include folders)
     1.8 -			//S32 item_count = items.size() + cats.size();
     1.9 -			S32 item_count = items.size();
    1.10 -			// </FS:Ansariel>
    1.11 +			S32 item_count = items.size() + cats.size();
    1.12  			args["COUNT"] = item_count;
    1.13  		}
    1.14  		LLNotificationsUtil::add(notification, args, LLSD(),
     2.1 --- a/indra/newview/llpanelmaininventory.cpp	Fri Dec 01 14:34:40 2017 +0100
     2.2 +++ b/indra/newview/llpanelmaininventory.cpp	Fri Dec 01 19:25:34 2017 +0100
     2.3 @@ -1008,9 +1008,15 @@
     2.4  
     2.5  void LLPanelMainInventory::updateItemcountText()
     2.6  {
     2.7 -	if(mItemCount != gInventory.getItemCount())
     2.8 +	// <FS:Ansariel> Include folders in inventory count
     2.9 +	//if(mItemCount != gInventory.getItemCount())
    2.10 +	//{
    2.11 +	//	mItemCount = gInventory.getItemCount();
    2.12 +	S32 new_count = gInventory.getItemCount() + gInventory.getCategoryCount();
    2.13 +	if(mItemCount != new_count)
    2.14  	{
    2.15 -		mItemCount = gInventory.getItemCount();
    2.16 +		mItemCount = new_count;
    2.17 +	// </FS:Ansariel>
    2.18  		mItemCountString = "";
    2.19  		// <FS:Ansariel> Use user-default locale from operating system
    2.20  		//LLLocale locale(LLLocale::USER_LOCALE);

mercurial