summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2017-12-13 12:47:25 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2017-12-13 12:47:25 +0200
commit9db2de69f15723518b7129dd198332520e958b85 (patch)
treea43de9f8d08b0cf1c47cb6ed89477385b8277f70 /indra/newview/llinventorybridge.cpp
parent27a3961168b958ce612bb12f0e56891a60144864 (diff)
MAINT-8061 Consider including folder count along with object count
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 4d1a6451e5..77c77023b1 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2213,8 +2213,22 @@ std::string LLFolderBridge::getLabelSuffix() const
{
return llformat(" ( %s ) ", LLTrans::getString("LoadingData").c_str());
}
-
- return LLInvFVBridge::getLabelSuffix();
+ std::string suffix = "";
+ if(mShowDescendantsCount)
+ {
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+ gInventory.collectDescendents(getUUID(), cat_array, item_array, TRUE);
+ S32 count = item_array.size();
+ if(count > 0)
+ {
+ std::ostringstream oss;
+ oss << count;
+ suffix = " ( " + oss.str() + " Items )";
+ }
+ }
+
+ return LLInvFVBridge::getLabelSuffix() + suffix;
}
LLFontGL::StyleFlags LLFolderBridge::getLabelStyle() const