diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-05-11 17:18:43 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-05-11 17:18:43 +0300 |
commit | 8e6d54e7b90befda29dcb4f1ffb83ae6e60d0f97 (patch) | |
tree | 45745871bf581185c8e03d537eb66bdce06e5153 /indra/newview | |
parent | bb3380b2207ea1413536320782d07cb27bc3a47c (diff) |
MAINT-7403 Disallow emptying Trash while in the Recent tab of Inventory
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bf4a2301ae..e944e3830f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3870,6 +3870,13 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items } if(trash_id == mUUID) { + bool is_recent_panel = false; + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + if (active_panel && (active_panel->getName() == "Recent Items")) + { + is_recent_panel = true; + } + // This is the trash. items.push_back(std::string("Empty Trash")); @@ -3877,7 +3884,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items LLInventoryModel::item_array_t* item_array; gInventory.getDirectDescendentsOf(mUUID, cat_array, item_array); // Enable Empty menu item only when there is something to act upon. - if (0 == cat_array->size() && 0 == item_array->size()) + if ((0 == cat_array->size() && 0 == item_array->size()) || is_recent_panel) { disabled_items.push_back(std::string("Empty Trash")); } |