diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-08-04 00:15:36 +0300 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2022-08-04 00:15:36 +0300 |
| commit | ea26ee5e92aa93ed966581ab17da5fc38d43a884 (patch) | |
| tree | 9362314316f9cfddb84761745ebf9ba5fc0261cb /indra/newview/llpanelobjectinventory.cpp | |
| parent | eba7ae24dc00725909aea0ede7c8b3d3f4394017 (diff) | |
| parent | 9dba9f80f4d40ec12a735ddbb66a9d103a959ece (diff) | |
Merge branch 'master' into DRTVWR-548-maint-N
# Conflicts:
# indra/newview/llfloaterworldmap.cpp
# indra/newview/llvovolume.cpp
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
| -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(); } } |
