summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderviewitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r--indra/newview/llfolderviewitem.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index d2bbfa2c2b..57e5488a4e 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -2334,6 +2334,21 @@ void LLFolderViewFolder::draw()
time_t LLFolderViewFolder::getCreationDate() const
{
+ // folders have no creation date so use first non-folder descendent's date
+ if (!mCreationDate)
+ {
+ for(items_t::const_iterator iit = mItems.begin();
+ iit != mItems.end(); ++iit)
+ {
+ LLFolderViewItem* itemp = (*iit);
+ if (itemp->getCreationDate())
+ {
+ mCreationDate = itemp->getCreationDate();
+ break;
+ }
+ }
+ }
+
return llmax<time_t>(mCreationDate, mSubtreeCreationDate);
}