summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeslie Linden <leslie@lindenlab.com>2012-01-18 13:39:04 -0800
committerLeslie Linden <leslie@lindenlab.com>2012-01-18 13:39:04 -0800
commit245f29ca2646157958f1a86bd2bae6cb54275223 (patch)
treeb3a6c84aa6eb1ee41c7d5deed737cb6bb7492d38
parentb18d54be9fb4998854e39df8fbaa271ceb2b8f89 (diff)
EXP-1550 FIX -- New tag shown and not removed on click when rezzing an item from Received Items panel and taking back into inventory.
* Inventory folder creation dates are now only set once, rather than being updated every time a new item is added.
-rw-r--r--indra/newview/llfolderviewitem.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/indra/newview/llfolderviewitem.cpp b/indra/newview/llfolderviewitem.cpp
index aee5a47011..8d6114c887 100644
--- a/indra/newview/llfolderviewitem.cpp
+++ b/indra/newview/llfolderviewitem.cpp
@@ -2146,8 +2146,14 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
item->dirtyFilter();
- // Update the folder creation date if the child is newer than our current date
- setCreationDate(llmax<time_t>(mCreationDate, item->getCreationDate()));
+ // 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;
+ }
// Handle sorting
requestArrange();
@@ -2157,8 +2163,11 @@ BOOL LLFolderViewFolder::addItem(LLFolderViewItem* item)
LLFolderViewFolder* parentp = getParentFolder();
while (parentp)
{
- // Update the folder creation date if the child is newer than our current date
- parentp->setCreationDate(llmax<time_t>(parentp->mCreationDate, item->getCreationDate()));
+ // Update the parent folder creation date
+ if (setting_date && (parentp->mCreationDate == 0))
+ {
+ parentp->setCreationDate(item_creation_date);
+ }
if (parentp->mSortFunction.isByDate())
{