summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2016-12-19 19:18:53 +0200
committerAndreyL ProductEngine <alihatskiy@productengine.com>2016-12-19 19:18:53 +0200
commit946b28ad765dc43ad6d1c715fa93a6f7c233ce64 (patch)
tree00b404be87ca637aa58b1feb6d69a06bd0be3d96 /indra/newview/llpanelmaininventory.cpp
parentb05a8c3403212a204eb09f9bcdec42a4e02f502e (diff)
parentec5051699ac4ca22b608e09a66604dd6639fe6b1 (diff)
Merged STORM-2142
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index c9fc1cc33e..fa946ee5c7 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -1192,6 +1192,20 @@ bool LLPanelMainInventory::isSaveTextureEnabled(const LLSD& userdata)
BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata)
{
const std::string command_name = userdata.asString();
+ if (command_name == "not_empty")
+ {
+ BOOL status = FALSE;
+ LLFolderViewItem* current_item = getActivePanel()->getRootFolder()->getCurSelectedItem();
+ if (current_item)
+ {
+ const LLUUID& item_id = static_cast<LLFolderViewModelItemInventory*>(current_item->getViewModelItem())->getUUID();
+ LLInventoryModel::cat_array_t* cat_array;
+ LLInventoryModel::item_array_t* item_array;
+ gInventory.getDirectDescendentsOf(item_id, cat_array, item_array);
+ status = (0 == cat_array->size() && 0 == item_array->size());
+ }
+ return status;
+ }
if (command_name == "delete")
{
return getActivePanel()->isSelectionRemovable();