From df3587752d26f05b0eb28af499f36654427f9e7b Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Wed, 5 Oct 2022 17:04:10 +0200 Subject: [PATCH] gcal-month-view: Use gcal_view_set_date() to update date on scroll This way the content of the view is updated properly, otherwise only internal GDateTime structure had been updated, but not the view itself. Closes https://gitlab.gnome.org/GNOME/gnome-calendar/-/issues/868 --- src/gui/views/gcal-month-view.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/views/gcal-month-view.c b/src/gui/views/gcal-month-view.c index cc83f0fa..54930603 100644 --- a/src/gui/views/gcal-month-view.c +++ b/src/gui/views/gcal-month-view.c @@ -1685,9 +1685,10 @@ on_scroll_controller_scrolled_cb (GtkEventControllerScroll *scroll_controller, diff = self->scroll_value > 0.0 ? 1.0 : -1.0; new_date = g_date_time_add_months (self->date, diff); - gcal_set_date_time (&self->date, new_date); self->scroll_value = 0.0; + gcal_view_set_date (GCAL_VIEW (self), new_date); + g_object_notify (G_OBJECT (self), "active-date"); return GDK_EVENT_STOP;