summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderviewitem.cpp
diff options
context:
space:
mode:
authorDessie Linden <dessie@lindenlab.com>2010-06-11 11:51:59 -0700
committerDessie Linden <dessie@lindenlab.com>2010-06-11 11:51:59 -0700
commita21b7b330b65eebff050eb6c036745cac1578232 (patch)
treef1d39777dc34fe5807f5b4a8bfdb4aadcb79ea62 /indra/newview/llfolderviewitem.cpp
parent8ea4802251cbfb4fcf112f597f4a4ff1ab0d3f1f (diff)
parent571c2bc5e5190cae7324dd235f9c44db9823327a (diff)
Merged from viewer-release
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r--indra/newview/llfolderviewitem.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index 54e9bd5383..0c437cf035 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -96,6 +96,7 @@ void LLFolderViewItem::cleanupClass()
LLFolderViewItem::Params::Params()
: icon(),
icon_open(),
+ icon_overlay(),
root(),
listener(),
folder_arrow_image("folder_arrow_image"),
@@ -133,6 +134,7 @@ LLFolderViewItem::LLFolderViewItem(const LLFolderViewItem::Params& p)
mCreationDate(p.creation_date),
mIcon(p.icon),
mIconOpen(p.icon_open),
+ mIconOverlay(p.icon_overlay),
mListener(p.listener),
mHidden(false),
mShowLoadStatus(false)
@@ -617,6 +619,7 @@ const std::string& LLFolderViewItem::getSearchableLabel() const
LLViewerInventoryItem * LLFolderViewItem::getInventoryItem(void)
{
+ if (!getListener()) return NULL;
return gInventory.getItem(getListener()->getUUID());
}
@@ -948,7 +951,8 @@ void LLFolderViewItem::draw()
mDragAndDropTarget = FALSE;
}
-
+ const LLViewerInventoryItem *item = getInventoryItem();
+ const BOOL highlight_link = mIconOverlay && item && item->getIsLinkType();
//--------------------------------------------------------------------------------//
// Draw open icon
//
@@ -962,6 +966,10 @@ void LLFolderViewItem::draw()
mIcon->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1);
}
+ if (highlight_link)
+ {
+ mIconOverlay->draw(icon_x, getRect().getHeight() - mIcon->getHeight() - TOP_PAD + 1);
+ }
//--------------------------------------------------------------------------------//
// Exit if no label to draw
@@ -972,8 +980,7 @@ void LLFolderViewItem::draw()
}
LLColor4 color = (mIsSelected && filled) ? sHighlightFgColor : sFgColor;
- const LLViewerInventoryItem *item = getInventoryItem();
- if (item && item->getIsLinkType()) color = sLinkColor;
+ if (highlight_link) color = sLinkColor;
if (in_library) color = sLibraryColor;
F32 right_x = 0;