summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-06-16 22:22:59 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-06-16 22:43:10 +0300
commitf608eafc3724899a16d01d4b9464a21f8fbc08d3 (patch)
treefd9811269b11e9d595615116a30fc23813287039
parent26f64e4f0a007edc01996cdc0bc69121a16749b9 (diff)
SL-19496 Fix attempts to open trash for thumnail assigment do not work.
-rw-r--r--indra/newview/llfloaterchangeitemthumbnail.cpp4
-rw-r--r--indra/newview/llinventorybridge.cpp2
-rw-r--r--indra/newview/llinventorygallerymenu.cpp2
3 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llfloaterchangeitemthumbnail.cpp b/indra/newview/llfloaterchangeitemthumbnail.cpp
index c3392889fb..48378cb724 100644
--- a/indra/newview/llfloaterchangeitemthumbnail.cpp
+++ b/indra/newview/llfloaterchangeitemthumbnail.cpp
@@ -295,8 +295,8 @@ void LLFloaterChangeItemThumbnail::refreshFromInventory()
if (obj)
{
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- bool in_trash = (obj->getUUID() == trash_id) || gInventory.isObjectDescendentOf(obj->getUUID(), trash_id);
- if (in_trash)
+ bool in_trash = gInventory.isObjectDescendentOf(obj->getUUID(), trash_id);
+ if (in_trash && obj->getUUID() != trash_id)
{
// Close properties when moving to trash
// Aren't supposed to view properties from trash
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 02a29f2ac9..a2bf9e7cd2 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4218,6 +4218,8 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items
{
disabled_items.push_back(std::string("Empty Trash"));
}
+
+ items.push_back(std::string("thumbnail"));
}
else if(isItemInTrash())
{
diff --git a/indra/newview/llinventorygallerymenu.cpp b/indra/newview/llinventorygallerymenu.cpp
index 68ead64839..e30883d564 100644
--- a/indra/newview/llinventorygallerymenu.cpp
+++ b/indra/newview/llinventorygallerymenu.cpp
@@ -334,7 +334,7 @@ void LLInventoryGalleryContextMenu::updateMenuItemsVisibility(LLContextMenu* men
if(!is_link)
{
items.push_back(std::string("thumbnail"));
- if (!is_agent_inventory)
+ if (!is_agent_inventory || (is_in_trash && !is_trash))
{
disabled_items.push_back(std::string("thumbnail"));
}