From fc72e2d95f1b8dc36246823afe09cceee5f352c3 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 21 Nov 2016 18:01:34 +0200 Subject: MAINT-6938 Fixed Inventory gear menu, 'empty' entries are always enabled. --- indra/newview/llpanelmaininventory.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 211cb32c01..cb28d88466 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1251,6 +1251,18 @@ BOOL LLPanelMainInventory::isActionEnabled(const LLSD& userdata) LLSidepanelInventory* parent = LLFloaterSidePanelContainer::getPanel("inventory"); return parent ? parent->canShare() : FALSE; } + if (command_name == "empty_trash") + { + const LLUUID &trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH); + LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(trash_id); + return children != LLInventoryModel::CHILDREN_NO; + } + if (command_name == "empty_lostnfound") + { + const LLUUID &trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LOST_AND_FOUND); + LLInventoryModel::EHasChildren children = gInventory.categoryHasChildren(trash_id); + return children != LLInventoryModel::CHILDREN_NO; + } return TRUE; } -- cgit v1.3