diff options
| author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-07-01 22:37:09 +0300 | 
|---|---|---|
| committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-07-01 22:37:44 +0300 | 
| commit | 0fbfa6e884e1892b6a7049d669782e3b3704cd2f (patch) | |
| tree | 1186d54618d959e82cd4f67fd3280981ec9bb158 /indra | |
| parent | a3312328bfd211998e32985e0c4b0ff242b8c8cf (diff) | |
SL-17493 Show total object count in object inventory
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 15 | 
1 files changed, 14 insertions, 1 deletions
| diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 0d987df6ca..cfaa9456be 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -618,7 +618,18 @@ const std::string& LLTaskCategoryBridge::getDisplayName() const  	if (cat)  	{ -		mDisplayName.assign(cat->getName()); +        std::string name = cat->getName(); +        if (mChildren.size() > 0) +        { +            // Add item count +            // Normally we would be using getLabelSuffix for this +            // but object's inventory just uses displaynames +            LLStringUtil::format_map_t args; +            args["[ITEMS_COUNT]"] = llformat("%d", mChildren.size()); + +            name.append(" " + LLTrans::getString("InventoryItemsCount", args)); +        } +		mDisplayName.assign(name);  	}  	return mDisplayName; @@ -1522,6 +1533,8 @@ void LLPanelObjectInventory::createFolderViews(LLInventoryObject* inventory_root  		{  			createViewsForCategory(&contents, inventory_root, new_folder);  		} +        // Refresh for label to add item count +        new_folder->refresh();  	}  } | 
