I#135 - Cannot scroll up to previous date in Calendar's Week/Month View

Closes https://gitlab.gnome.org/GNOME/evolution/issues/135
This commit is contained in:
Milan Crha
2018-09-24 18:48:06 +02:00
parent 97995de157
commit d3f15b89db
+5 -1
View File
@@ -1114,7 +1114,11 @@ update_adjustment (ECalShellContent *cal_shell_content,
/* Determine the first date shown. */
start_date = week_view->base_date;
week_offset = floor (value + 0.5);
g_date_add_days (&start_date, week_offset * 7);
if (week_offset > 0)
g_date_add_days (&start_date, week_offset * 7);
else
g_date_subtract_days (&start_date, week_offset * (-7));
/* Convert the old & new first days shown to julian values. */
old_first_day_julian = g_date_get_julian (&first_day_shown);