diff options
| author | andreykproductengine <akleshchev@productengine.com> | 2016-11-21 18:01:34 +0200 |
|---|---|---|
| committer | andreykproductengine <akleshchev@productengine.com> | 2016-11-21 18:01:34 +0200 |
| commit | fc72e2d95f1b8dc36246823afe09cceee5f352c3 (patch) | |
| tree | bcafe5559023724af9ec5a3bc7e8258d35bb9d1e /indra/newview/llpanelmaininventory.cpp | |
| parent | c74d1acbfc3e734f789c7f916e37ceb9fcc26b16 (diff) | |
MAINT-6938 Fixed Inventory gear menu, 'empty' entries are always enabled.
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
| -rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
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<LLSidepanelInventory>("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; } |
