diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-13 11:27:54 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-13 11:27:54 +0100 |
commit | 845d6f36c16f2409eff161f8005d9dd2a0a4bf50 (patch) | |
tree | e642b9bdcf716a1f1bae2456cba2751fb6502715 /menuitems.c | |
parent | 4dcbf19ea239f90d646893d9580c4edf90386036 (diff) | |
download | vdr-845d6f36c16f2409eff161f8005d9dd2a0a4bf50.tar.gz vdr-845d6f36c16f2409eff161f8005d9dd2a0a4bf50.tar.bz2 |
When toggling a timer between "Single" and "Repeating", the previous setting is now retained in case the user toggles back to the original value
Diffstat (limited to 'menuitems.c')
-rw-r--r-- | menuitems.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/menuitems.c b/menuitems.c index 6a6d88d6..ba205c0f 100644 --- a/menuitems.c +++ b/menuitems.c @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menuitems.c 2.12 2012/03/08 13:22:22 kls Exp $ + * $Id: menuitems.c 2.13 2012/03/13 11:21:57 kls Exp $ */ #include "menuitems.h" @@ -855,6 +855,7 @@ cMenuEditDateItem::cMenuEditDateItem(const char *Name, time_t *Value, int *WeekD value = Value; weekdays = WeekDays; oldvalue = 0; + oldweekdays = 0; dayindex = weekdays ? FindDayIndex(*weekdays) : 0; Set(); } @@ -892,10 +893,12 @@ void cMenuEditDateItem::ToggleRepeating(void) if (*weekdays) { *value = cTimer::SetTime(oldvalue ? oldvalue : time(NULL), 0); oldvalue = 0; + oldweekdays = *weekdays; *weekdays = 0; } else { - *weekdays = days[cTimer::GetWDay(*value)]; + *weekdays = oldweekdays ? oldweekdays : days[cTimer::GetWDay(*value)]; + oldweekdays = 0; dayindex = FindDayIndex(*weekdays); oldvalue = *value; *value = 0; |