From dff7f8055db8ef810adeaddf38c05ea4d75fe11b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 14 Nov 2023 13:27:55 +0100 Subject: [PATCH] Calendar: Go to day/today in Year View doesn't update internal view dates Then when moving to the next/previous year the chosen year is from the previous selection, not from the selected day's year. --- src/modules/calendar/e-cal-shell-content.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/modules/calendar/e-cal-shell-content.c b/src/modules/calendar/e-cal-shell-content.c index 5efc1c6fc5..297b847682 100644 --- a/src/modules/calendar/e-cal-shell-content.c +++ b/src/modules/calendar/e-cal-shell-content.c @@ -2538,17 +2538,21 @@ e_cal_shell_content_move_view_range (ECalShellContent *cal_shell_content, tmt = i_cal_time_as_timet (tt); e_calendar_view_set_selected_time_range (cal_view, tmt, tmt); + cal_shell_content->priv->view_start = date; + cal_shell_content->priv->view_end = date; } g_clear_object (&tt); /* one-day selection takes care of the view range move with left view kind */ e_calendar_item_set_selection (e_calendar_get_item (calendar), &date, &date); break; case E_CALENDAR_VIEW_MOVE_TO_EXACT_DAY: + time_to_gdate_with_zone (&date, exact_date, zone); if (cal_shell_content->priv->current_view == E_CAL_VIEW_KIND_YEAR) { ECalendarView *cal_view = e_cal_shell_content_get_current_calendar_view (cal_shell_content); e_calendar_view_set_selected_time_range (cal_view, exact_date, exact_date); + cal_shell_content->priv->view_start = date; + cal_shell_content->priv->view_end = date; } else { - time_to_gdate_with_zone (&date, exact_date, zone); e_cal_shell_content_change_view (cal_shell_content, E_CAL_VIEW_KIND_DAY, &date, &date, FALSE); } break;