summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2017-05-22 20:24:45 +0300
committerandreykproductengine <andreykproductengine@lindenlab.com>2017-05-22 20:24:45 +0300
commit5db0af5327e1aa21f607c51cf9e69e3733395350 (patch)
treeb3efa8434a67417cf444accc13024a886e0b5b6d /indra/newview/llinventorybridge.cpp
parentb4e54352171f6b95714270909cda99dc1c5ad3f0 (diff)
MAINT-7419 Workaround for some purge and trash issues, stuck descendants count
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1b32fc9dfe..c8a20c9d97 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -3884,8 +3884,14 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
LLInventoryModel::cat_array_t* cat_array;
LLInventoryModel::item_array_t* item_array;
gInventory.getDirectDescendentsOf(mUUID, cat_array, item_array);
+ LLViewerInventoryCategory *trash = getCategory();
// Enable Empty menu item only when there is something to act upon.
- if ((0 == cat_array->size() && 0 == item_array->size()) || is_recent_panel)
+ // Also don't enable menu if folder isn't fully fetched
+ if ((0 == cat_array->size() && 0 == item_array->size())
+ || is_recent_panel
+ || !trash
+ || trash->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN
+ || trash->getDescendentCount() == LLViewerInventoryCategory::VERSION_UNKNOWN)
{
disabled_items.push_back(std::string("Empty Trash"));
}