diff options
author | Dave Parks <davep@lindenlab.com> | 2012-06-15 14:29:46 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2012-06-15 14:29:46 -0500 |
commit | 99dc246ac843114f20f7aa99531451fcf46df3ed (patch) | |
tree | d94a0a31e00c53ea359d9939d1928180d398b334 /indra/newview/llfolderviewitem.cpp | |
parent | a519e34f02b4b2663fe082ba9ad12f1b423669cb (diff) | |
parent | d76715776bb9e26577c4e505745eb2773e8a4796 (diff) |
Merge
Diffstat (limited to 'indra/newview/llfolderviewitem.cpp')
-rw-r--r-- | indra/newview/llfolderviewitem.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index d2b4866987..515e544452 100644 --- a/indra/newview/llfolderviewitem.cpp +++ b/indra/newview/llfolderviewitem.cpp @@ -2183,14 +2183,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(); @@ -2200,11 +2194,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()) { |