From f55706ecaf69684e1e25e3a312fb997fe77191e1 Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Fri, 5 Nov 2010 21:36:41 +0000 Subject: [PATCH] Fix error in dense-cal widget where the last occurrence of a SX wasn't displayed. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19756 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome-utils/gnc-dense-cal-store.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gnome-utils/gnc-dense-cal-store.c b/src/gnome-utils/gnc-dense-cal-store.c index 2348384f85..eb039ef334 100644 --- a/src/gnome-utils/gnc-dense-cal-store.c +++ b/src/gnome-utils/gnc-dense-cal-store.c @@ -200,7 +200,12 @@ gdcs_generic_update_recurrences(GncDenseCalStore *trans, GDate *start, GList *re date = next; recurrenceListNextInstance(recurrences, &date, &next); } - trans->num_real_marks = (i == 0 ? 0 : (i - 1)); + trans->num_real_marks = i; + /* cstim: Previously this was i-1 but that's just plain wrong for + * occurrences which are coming to an end, because then i contains + * the number of (rest) occurrences exactly! Subtracting one means + * we will miss the last one. */ + g_signal_emit_by_name(trans, "update", GUINT_TO_POINTER(1)); }