From 1140ae3489a9e260a0abb808b4152f2d57384d67 Mon Sep 17 00:00:00 2001 From: Kitty Barnett Date: Thu, 29 Dec 2022 19:51:33 +0100 Subject: Add a texture inspector and show it when hovering over an inventory textory (or folder containing - among others - exactly one texture) and when hovering over notecard embedded textures --- indra/newview/llviewertexteditor.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index e2de7ac825..299047d91b 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -36,6 +36,7 @@ #include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" #include "llfocusmgr.h" +#include "llinspecttexture.h" #include "llinventorybridge.h" #include "llinventorydefines.h" #include "llinventorymodel.h" @@ -245,6 +246,16 @@ public: } virtual BOOL handleToolTip(S32 x, S32 y, MASK mask ) { + if (LLAssetType::AT_TEXTURE == mItem->getType()) + { + LLToolTipMgr::instance().show(LLToolTip::Params() + .message(mToolTip) + .create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1)) + .create_params(LLSD().with("inv_type", mItem->getInventoryType()).with("asset_id", mItem->getAssetUUID()))); + + return TRUE; + } + if (!mToolTip.empty()) { LLToolTipMgr::instance().show(mToolTip); -- cgit v1.2.3 From 6ada89ce0b9372d6a7f49ac45bad6713ad5d3355 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 1 Feb 2023 00:35:22 +0200 Subject: SL-19117 Extend texture preview to show thumbnails when present --- indra/newview/llviewertexteditor.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 299047d91b..13505a2cf3 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -246,12 +246,17 @@ public: } virtual BOOL handleToolTip(S32 x, S32 y, MASK mask ) { - if (LLAssetType::AT_TEXTURE == mItem->getType()) + if (mItem->getThumbnailUUID().notNull()) { + LLSD params; + params["inv_type"] = mItem->getInventoryType(); + params["thumbnail_id"] = mItem->getThumbnailUUID(); + params["asset_id"] = mItem->getAssetUUID(); + LLToolTipMgr::instance().show(LLToolTip::Params() .message(mToolTip) .create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1)) - .create_params(LLSD().with("inv_type", mItem->getInventoryType()).with("asset_id", mItem->getAssetUUID()))); + .create_params(params)); return TRUE; } -- cgit v1.2.3 From 45a54ba544b12ce4b27c52dd014c9b14bcb0d2c7 Mon Sep 17 00:00:00 2001 From: Alexander Gavriliuk Date: Tue, 6 Jun 2023 21:43:23 +0200 Subject: SL-18328 Fix opening the right profile on click Callingcard embedded to a Notecard --- indra/newview/llviewertexteditor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 7abb42dd8a..d2701f0aff 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -1194,7 +1194,11 @@ void LLViewerTextEditor::openEmbeddedLandmark( LLPointer item_p void LLViewerTextEditor::openEmbeddedCallingcard( LLInventoryItem* item, llwchar wc ) { - if(item && !item->getCreatorUUID().isNull()) + if (item && !item->getDescription().empty()) + { + LLAvatarActions::showProfile(LLUUID(item->getDescription())); + } + else if (item && !item->getCreatorUUID().isNull()) { LLAvatarActions::showProfile(item->getCreatorUUID()); } -- cgit v1.2.3