summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelexperiencelog.cpp
diff options
context:
space:
mode:
authorGlenn Glazer <coyot@lindenlab.com>2016-03-08 13:32:28 -0800
committerGlenn Glazer <coyot@lindenlab.com>2016-03-08 13:32:28 -0800
commitec683bb9cf6688633d8bc7ecbdf72f7cbc14d349 (patch)
tree59ada405958cd7764a96cfa35ccc89e83706b5af /indra/newview/llpanelexperiencelog.cpp
parentdaf8b882a12cf903d180f6303065d7b83f7a1958 (diff)
parent5a5c023e291990a463b1a91846ce82c70da8daab (diff)
pull from trunk
Diffstat (limited to 'indra/newview/llpanelexperiencelog.cpp')
-rw-r--r--indra/newview/llpanelexperiencelog.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/indra/newview/llpanelexperiencelog.cpp b/indra/newview/llpanelexperiencelog.cpp
index df03ef7526..30576a8d67 100644
--- a/indra/newview/llpanelexperiencelog.cpp
+++ b/indra/newview/llpanelexperiencelog.cpp
@@ -54,7 +54,6 @@ LLPanelExperienceLog::LLPanelExperienceLog( )
buildFromFile("panel_experience_log.xml");
}
-
BOOL LLPanelExperienceLog::postBuild( void )
{
LLExperienceLog* log = LLExperienceLog::getInstance();
@@ -112,7 +111,7 @@ void LLPanelExperienceLog::refresh()
int itemsToSkip = mPageSize*mCurrentPage;
int items = 0;
bool moreItems = false;
-
+ LLSD events_to_save = events;
if (!events.emptyMap())
{
LLSD::map_const_iterator day = events.endMap();
@@ -120,6 +119,13 @@ void LLPanelExperienceLog::refresh()
{
--day;
const LLSD& dayArray = day->second;
+
+ std::string date = day->first;
+ if(!LLExperienceLog::instance().isNotExpired(date))
+ {
+ events_to_save.erase(day->first);
+ continue;
+ }
int size = dayArray.size();
if(itemsToSkip > size)
{
@@ -164,6 +170,7 @@ void LLPanelExperienceLog::refresh()
}
} while (day != events.beginMap());
}
+ LLExperienceLog::getInstance()->setEventsToSave(events_to_save);
if(waiting)
{
mEventList->deleteAllItems();
@@ -237,12 +244,8 @@ void LLPanelExperienceLog::notifyChanged()
void LLPanelExperienceLog::logSizeChanged()
{
int value = (int)(getChild<LLSpinCtrl>("logsizespinner")->get());
- bool dirty = value > 0 && value < LLExperienceLog::instance().getMaxDays();
LLExperienceLog::instance().setMaxDays(value);
- if(dirty)
- {
- refresh();
- }
+ refresh();
}
void LLPanelExperienceLog::onSelectionChanged()