Redraw calendar panel when switching views

Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2015-02-23 14:18:36 +01:00
parent dca7a32557
commit 55bbbaefac

View File

@ -87,6 +87,9 @@ void ui_calendar_view_next(void)
ui_calendar_view++; ui_calendar_view++;
if (ui_calendar_view == CAL_VIEWS) if (ui_calendar_view == CAL_VIEWS)
ui_calendar_view = 0; ui_calendar_view = 0;
/* The calendar panel needs to be erased when switching views. */
monthly_view_cache_month = 0;
} }
void ui_calendar_view_prev(void) void ui_calendar_view_prev(void)
@ -94,6 +97,9 @@ void ui_calendar_view_prev(void)
if (ui_calendar_view == 0) if (ui_calendar_view == 0)
ui_calendar_view = CAL_VIEWS; ui_calendar_view = CAL_VIEWS;
ui_calendar_view--; ui_calendar_view--;
/* The calendar panel needs to be erased when switching views. */
monthly_view_cache_month = 0;
} }
void ui_calendar_set_view(int view) void ui_calendar_set_view(int view)