summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorybridge.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r--indra/newview/llinventorybridge.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index c8ea14a11e..adeb65bf40 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -7488,6 +7488,15 @@ bool LLObjectBridge::renameItem(const std::string& new_name)
// | LLLSLTextBridge |
// +=================================================+
+LLUIImagePtr LLLSLTextBridge::getIcon() const
+{
+ // Pass the item's flags so the script subtype (e.g. SST_LUA) is honored
+ // and the correct icon (Inv_Script vs Inv_Script_Luau) is selected.
+ LLInventoryItem* item = getItem();
+ U32 misc_flag = item ? item->getFlags() : 0;
+ return LLInventoryIcon::getIcon(LLAssetType::AT_LSL_TEXT, LLInventoryType::IT_LSL, misc_flag, false);
+}
+
void LLLSLTextBridge::openItem()
{
LLViewerInventoryItem* item = getItem();