summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp24
1 files changed, 19 insertions, 5 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 4d1a6451e5..67b51f11b3 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2213,8 +2213,24 @@ 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;
+ LLStringUtil::format_map_t args;
+ args["[ITEMS_COUNT]"] = oss.str();
+ suffix = " " + LLTrans::getString("InventoryItemsCount", args);
+ }
+ }
+
+ return LLInvFVBridge::getLabelSuffix() + suffix;
}
LLFontGL::StyleFlags LLFolderBridge::getLabelStyle() const
@@ -6572,11 +6588,9 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
getClipboardEntries(true, items, disabled_items, flags);
items.push_back(std::string("Wearable And Object Separator"));
-
items.push_back(std::string("Wearable Edit"));
- bool modifiable = !gAgentWearables.isWearableModifiable(item->getUUID());
- if (((flags & FIRST_SELECTED_ITEM) == 0) || modifiable)
+ if (((flags & FIRST_SELECTED_ITEM) == 0) || (item && !gAgentWearables.isWearableModifiable(item->getUUID())))
{
disabled_items.push_back(std::string("Wearable Edit"));
}