From b04cea1f9dfe480d75cffc847ea387688f37707f Mon Sep 17 00:00:00 2001 From: louis Date: Fri, 3 Apr 2015 16:04:08 +0200 Subject: [PATCH] fixed bug that date was drawn every flush in displayreplay --- HISTORY | 1 + views/displayreplayview.c | 4 ++-- views/viewhelpers.c | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 1c7419a..a80d7b7 100644 --- a/HISTORY +++ b/HISTORY @@ -270,3 +270,4 @@ Version 0.4.0 - fixed bug that time was not correctly drawn if a submenu implements its own time display +- fixed bug that date was drawn every flush in displayreplay diff --git a/views/displayreplayview.c b/views/displayreplayview.c index 690eb96..818ba9e 100644 --- a/views/displayreplayview.c +++ b/views/displayreplayview.c @@ -55,7 +55,6 @@ void cDisplayReplayView::DrawDate(void) { if (!SetDate(stringTokens, intTokens)) { return; } - ClearViewElement(veDateTime); DrawViewElement(veDateTime, &stringTokens, &intTokens); } @@ -78,7 +77,7 @@ void cDisplayReplayView::DrawTime(void) { void cDisplayReplayView::DrawTitle(const cRecording *recording) { map < string, string > stringTokens; map < string, int > intTokens; - + const char *recName = NULL; const cRecordingInfo *recInfo = recording->Info(); if (recInfo) { @@ -262,6 +261,7 @@ void cDisplayReplayView::DrawMarks(const cMarks *marks, int current, int total) return; if (!MarksChanged(marks, current)) return; + map < string, string > stringTokens; map < string, int > intTokens; map < string, vector< map< string, string > > > loopTokens; diff --git a/views/viewhelpers.c b/views/viewhelpers.c index ebc9d75..4fd50ad 100644 --- a/views/viewhelpers.c +++ b/views/viewhelpers.c @@ -491,6 +491,7 @@ bool cViewHelpers::SetDate(map < string, string > &stringTokens, map < string, i int min = now->tm_min; if (min == lastMinute) return false; + lastMinute = min; intTokens.insert(pair("year", now->tm_year + 1900)); intTokens.insert(pair("day", now->tm_mday));