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
This commit is contained in:
Milan Crha
2022-10-05 15:10:47 +00:00
committed by Georges Basile Stavracas Neto
parent 15ce841a6c
commit df3587752d
+2 -1
View File
@@ -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;