[evolution] I#711 - "Select Today" goes to wrong date if month view is scrolled



commit 470d0897b0d3d745f6824e4f2b3cc6dc0aedd048
Author: Milan Crha <mcrha redhat com>
Date:   Tue Nov 19 09:43:18 2019 +0100

    I#711 - "Select Today" goes to wrong date if month view is scrolled
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/711

 src/calendar/gui/e-week-view.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/calendar/gui/e-week-view.c b/src/calendar/gui/e-week-view.c
index 3c9303ab8c..ea424c39ee 100644
--- a/src/calendar/gui/e-week-view.c
+++ b/src/calendar/gui/e-week-view.c
@@ -1446,7 +1446,7 @@ week_view_set_selected_time_range (ECalendarView *cal_view,
 
        g_return_if_fail (E_IS_WEEK_VIEW (week_view));
 
-       if (!g_date_valid (&week_view->base_date)) {
+       if (!g_date_valid (&week_view->priv->first_day_shown)) {
                /* This view has not been initialized/shown yet, thus skip this. */
                return;
        }
@@ -1455,7 +1455,7 @@ week_view_set_selected_time_range (ECalendarView *cal_view,
 
        /* Set the selection to the given days. */
        week_view->selection_start_day = g_date_get_julian (&date)
-               - g_date_get_julian (&week_view->base_date);
+               - g_date_get_julian (&week_view->priv->first_day_shown);
        if (end_time == start_time
            || end_time <= time_add_day_with_zone (start_time, 1,
                                                   e_calendar_view_get_timezone (E_CALENDAR_VIEW 
(week_view))))
@@ -1463,7 +1463,7 @@ week_view_set_selected_time_range (ECalendarView *cal_view,
        else {
                time_to_gdate_with_zone (&end_date, end_time - 60, e_calendar_view_get_timezone 
(E_CALENDAR_VIEW (week_view)));
                week_view->selection_end_day = g_date_get_julian (&end_date)
-                       - g_date_get_julian (&week_view->base_date);
+                       - g_date_get_julian (&week_view->priv->first_day_shown);
        }
 
        /* Make sure the selection is valid. */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]