SL-19334 Show item count info only for items in current folder in single-folder view

meow-7.2.2
Mnikolenko Productengine 2023-03-03 18:39:29 +02:00
parent c74658b19b
commit bb964fb495
1 changed files with 11 additions and 0 deletions

View File

@ -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);