From 42d1b51e9302bde4dc290affe781a325c106320b Mon Sep 17 00:00:00 2001 From: Seth ProductEngine Date: Thu, 22 Mar 2012 18:19:02 +0200 Subject: CHUI-54 FIXED Backed out fix for EXP-1550 restoring inventory folder creation date updating logic. An inventory folder creation date should be updated every time a new item is created in it. Othervise the sorting by creation date is broken. However this leaves the EXP-1550 issue unresolved. --- indra/newview/llfolderviewitem.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp index 8d6114c887..aee5a47011 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(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(parentp->mCreationDate, item->getCreationDate())); if (parentp->mSortFunction.isByDate()) { -- cgit v1.2.3