diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2023-03-03 18:39:29 +0200 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2023-03-03 18:39:29 +0200 |
commit | bb964fb49512abcce7018c339d752cc35240816d (patch) | |
tree | 40ab5a3798957a789d0d2c791d34b75b02c6392b /indra/newview/llpanelmaininventory.cpp | |
parent | c74658b19b1ac28d5bf240e940a7ad97ff034e3c (diff) |
SL-19334 Show item count info only for items in current folder in single-folder view
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 1eb2d5bbdc..6b9e04840d 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -825,6 +825,17 @@ void LLPanelMainInventory::updateItemcountText() { text = getString("ItemcountUnknown", string_args); } + + if (mSingleFolderMode) + { + LLInventoryModel::cat_array_t *cats; + LLInventoryModel::item_array_t *items; + gInventory.getDirectDescendentsOf(mSingleFolderPanelInventory->getSingleFolderRoot(), cats, items); + + string_args["[ITEM_COUNT]"] = llformat("%d", items->size()); + string_args["[CATEGORY_COUNT]"] = llformat("%d", cats->size()); + text = getString("ItemcountCompleted", string_args); + } mCounterCtrl->setValue(text); mCounterCtrl->setToolTip(text); |