From 671118638f0419dace19288d0db559268a4e35d9 Mon Sep 17 00:00:00 2001 From: Mike Antipov Date: Mon, 1 Mar 2010 14:31:06 +0200 Subject: Fixed major bug EXT-5308 (right click - Copy Asset UUID, copies null key to clipboard.) - disabled "Copy Asset UUID" menu item for Inventory items w/o known assets. --HG-- branch : product-engine --- indra/newview/llinventorybridge.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index c4cf76fde1..27a40c6ba0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -31,6 +31,9 @@ */ #include "llviewerprecompiledheaders.h" +// external projects +#include "lltransfersourceasset.h" + #include "llinventorybridge.h" #include "llagent.h" @@ -583,7 +586,16 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, if (show_asset_id) { items.push_back(std::string("Copy Asset UUID")); - if ( (! ( isItemPermissive() || gAgent.isGodlike() ) ) + + bool is_asset_knowable = false; + + LLViewerInventoryItem* inv_item = gInventory.getItem(mUUID); + if (inv_item) + { + is_asset_knowable = is_asset_id_knowable(inv_item->getType()); + } + if ( !is_asset_knowable // disable menu item for Inventory items with unknown asset. EXT-5308 + || (! ( isItemPermissive() || gAgent.isGodlike() ) ) || (flags & FIRST_SELECTED_ITEM) == 0) { disabled_items.push_back(std::string("Copy Asset UUID")); -- cgit v1.2.3