diff options
| author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-06-11 14:10:13 +0300 |
|---|---|---|
| committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-06-11 14:10:13 +0300 |
| commit | c757446ac7218b4216ff97b5aaceb91f77eb1ca7 (patch) | |
| tree | 38826509ad69b0c696556d08daa16513c311dfb5 /indra/newview/llfolderviewitem.cpp | |
| parent | 53fcb0927539c224a9c078605f9a1164acbb5f53 (diff) | |
| parent | fc6d238884f06951a413004b46569304a9d9280a (diff) | |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
| -rw-r--r-- | indra/newview/llfolderviewitem.cpp | 13 |
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; |
