summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/llinventory/llinventory.cpp11
-rw-r--r--indra/llinventory/llinventory.h1
-rw-r--r--indra/newview/llfolderviewmodelinventory.h1
-rw-r--r--indra/newview/llinspecttexture.cpp2
-rw-r--r--indra/newview/llinventorybridge.cpp15
-rw-r--r--indra/newview/llinventorybridge.h2
-rw-r--r--indra/newview/llinventorypanel.cpp1
-rw-r--r--indra/newview/llpanelobjectinventory.cpp1
8 files changed, 33 insertions, 1 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp
index b897198d10..e00f652622 100644
--- a/indra/llinventory/llinventory.cpp
+++ b/indra/llinventory/llinventory.cpp
@@ -349,6 +349,7 @@ void LLInventoryItem::copyItem(const LLInventoryItem* other)
copyObject(other);
mPermissions = other->mPermissions;
mAssetUUID = other->mAssetUUID;
+ mThumbnailUUID = other->mThumbnailUUID;
mDescription = other->mDescription;
mSaleInfo = other->mSaleInfo;
mInventoryType = other->mInventoryType;
@@ -413,6 +414,7 @@ U32 LLInventoryItem::getCRC32() const
//LL_DEBUGS() << "8 crc: " << std::hex << crc << std::dec << LL_ENDL;
crc += (U32)mCreationDate;
//LL_DEBUGS() << "9 crc: " << std::hex << crc << std::dec << LL_ENDL;
+ crc += mThumbnailUUID.getCRC32();
return crc;
}
@@ -502,6 +504,15 @@ void LLInventoryItem::setSaleInfo(const LLSaleInfo& sale_info)
mSaleInfo = sale_info;
}
+const LLUUID& LLInventoryItem::getThumbnailUUID() const
+{
+ if (mThumbnailUUID.isNull() && mType == LLAssetType::AT_TEXTURE)
+ {
+ return mAssetUUID;
+ }
+ return mThumbnailUUID;
+}
+
LLInventoryType::EType LLInventoryItem::getInventoryType() const
{
return mInventoryType;
diff --git a/indra/llinventory/llinventory.h b/indra/llinventory/llinventory.h
index dfe8b7659b..7af542c49a 100644
--- a/indra/llinventory/llinventory.h
+++ b/indra/llinventory/llinventory.h
@@ -162,6 +162,7 @@ public:
virtual const std::string& getDescription() const;
virtual const std::string& getActualDescription() const; // Does not follow links
virtual const LLSaleInfo& getSaleInfo() const;
+ virtual const LLUUID& getThumbnailUUID() const;
virtual LLInventoryType::EType getInventoryType() const;
virtual U32 getFlags() const;
virtual time_t getCreationDate() const;
diff --git a/indra/newview/llfolderviewmodelinventory.h b/indra/newview/llfolderviewmodelinventory.h
index de28091c32..87e49189d8 100644
--- a/indra/newview/llfolderviewmodelinventory.h
+++ b/indra/newview/llfolderviewmodelinventory.h
@@ -39,6 +39,7 @@ class LLFolderViewModelItemInventory
public:
LLFolderViewModelItemInventory(class LLFolderViewModelInventory& root_view_model);
virtual const LLUUID& getUUID() const = 0;
+ virtual const LLUUID& getThumbnailUUID() const = 0;
virtual time_t getCreationDate() const = 0; // UTC seconds
virtual void setCreationDate(time_t creation_date_utc) = 0;
virtual PermissionMask getPermissionMask() const = 0;
diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp
index af96561c45..8a8d7ed1bb 100644
--- a/indra/newview/llinspecttexture.cpp
+++ b/indra/newview/llinspecttexture.cpp
@@ -138,7 +138,7 @@ LLToolTip* LLInspectTextureUtil::createInventoryToolTip(LLToolTip::Params p)
{
const LLSD& sdTooltip = p.create_params;
- if (sdTooltip.has("thumbnail_id"))
+ if (sdTooltip.has("thumbnail_id") && sdTooltip["thumbnail_id"].asUUID().notNull())
{
// go straight for tooltip regardless of type
return LLUICtrlFactory::create<LLTextureToolTip>(p);
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 7793b71f56..405c1f884a 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -2154,6 +2154,21 @@ LLViewerInventoryItem* LLItemBridge::getItem() const
return item;
}
+const LLUUID& LLItemBridge::getThumbnailUUID() const
+{
+ LLViewerInventoryItem* item = NULL;
+ LLInventoryModel* model = getInventoryModel();
+ if(model)
+ {
+ item = (LLViewerInventoryItem*)model->getItem(mUUID);
+ }
+ if (item)
+ {
+ return item->getThumbnailUUID();
+ }
+ return LLUUID::null;
+}
+
BOOL LLItemBridge::isItemPermissive() const
{
LLViewerInventoryItem* item = getItem();
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index bdffecf1c6..d56e0b778d 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -84,6 +84,7 @@ public:
// LLInvFVBridge functionality
//--------------------------------------------------------------------
virtual const LLUUID& getUUID() const { return mUUID; }
+ virtual const LLUUID& getThumbnailUUID() const { return LLUUID::null; }
virtual void clearDisplayName() { mDisplayName.clear(); }
virtual void restoreItem() {}
virtual void restoreToWorld() {}
@@ -251,6 +252,7 @@ public:
virtual LLUIImagePtr getIconOverlay() const;
LLViewerInventoryItem* getItem() const;
+ virtual const LLUUID& getThumbnailUUID() const;
protected:
BOOL confirmRemoveItem(const LLSD& notification, const LLSD& response);
diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp
index d6f4b8f103..e013de2491 100644
--- a/indra/newview/llinventorypanel.cpp
+++ b/indra/newview/llinventorypanel.cpp
@@ -1287,6 +1287,7 @@ BOOL LLInventoryPanel::handleToolTip(S32 x, S32 y, MASK mask)
{
LLSD params;
params["inv_type"] = vm_item_p->getInventoryType();
+ params["thumbnail_id"] = vm_item_p->getThumbnailUUID();
params["item_id"] = vm_item_p->getUUID();
LLToolTipMgr::instance().show(LLToolTip::Params()
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index fff25c6c61..70da9e430a 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -116,6 +116,7 @@ public:
virtual PermissionMask getPermissionMask() const { return PERM_NONE; }
/*virtual*/ LLFolderType::EType getPreferredType() const { return LLFolderType::FT_NONE; }
virtual const LLUUID& getUUID() const { return mUUID; }
+ virtual const LLUUID& getThumbnailUUID() const { return LLUUID::null;}
virtual time_t getCreationDate() const;
virtual void setCreationDate(time_t creation_date_utc);