summaryrefslogtreecommitdiff
path: root/indra/newview/llfolderviewitem.cpp
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2012-04-26 14:04:55 -0400
committerNat Goodspeed <nat@lindenlab.com>2012-04-26 14:04:55 -0400
commit78f2663c4a61a7983c84cf50e5d2fdd92811a1b0 (patch)
tree56bf81cc39cb8c5180508c37c552c8ab23273300 /indra/newview/llfolderviewitem.cpp
parentd6569db3520f7e0ce2d93febb6f4e26b48c08a3d (diff)
parent75c53a6a269890b9fe78b4b50d9b093a94778650 (diff)
Automated merge with http://hg.secondlife.com/viewer-release
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r--indra/newview/llfolderviewitem.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index afad27b4e0..c8ce5f7432 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -2146,14 +2146,8 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
item->dirtyFilter();
- // Update the folder creation date if the folder has no creation date
- bool setting_date = false;
- const time_t item_creation_date = item->getCreationDate();
- if ((item_creation_date > 0) && (mCreationDate == 0))
- {
- setCreationDate(item_creation_date);
- setting_date = true;
- }
+ // Update the folder creation date if the child is newer than our current date
+ setCreationDate(llmax<time_t>(mCreationDate, item->getCreationDate()));
// Handle sorting
requestArrange();
@@ -2163,11 +2157,8 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
LLFolderViewFolder* parentp = getParentFolder();
while (parentp)
{
- // Update the parent folder creation date
- if (setting_date && (parentp->mCreationDate == 0))
- {
- parentp->setCreationDate(item_creation_date);
- }
+ // Update the folder creation date if the child is newer than our current date
+ parentp->setCreationDate(llmax<time_t>(parentp->mCreationDate, item->getCreationDate()));
if (parentp->mSortFunction.isByDate())
{