summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfolderviewitem.cpp15
-rw-r--r--indra/newview/llfolderviewitem.h4
2 files changed, 17 insertions, 2 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);
}
diff --git a/indra/newview/llfolderviewitem.h b/indra/newview/llfolderviewitem.h
index fc941510ab..dbd7d5a370 100644
--- a/indra/newview/llfolderviewitem.h
+++ b/indra/newview/llfolderviewitem.h
@@ -135,7 +135,7 @@ protected:
std::string mSearchableLabel;
S32 mLabelWidth;
bool mLabelWidthDirty;
- time_t mCreationDate;
+ mutable time_t mCreationDate;
LLFolderViewFolder* mParentFolder;
LLFolderViewEventListener* mListener;
BOOL mIsCurSelection;
@@ -278,7 +278,7 @@ public:
// Used for sorting, like getLabel() above.
virtual time_t getCreationDate() const { return mCreationDate; }
-
+
LLFolderViewFolder* getParentFolder( void ) { return mParentFolder; }
const LLFolderViewFolder* getParentFolder( void ) const { return mParentFolder; }