r19756 - gnucash/trunk/src/gnome-utils - Fix error in dense-cal widget where the last occurrence of a SX wasn't displayed.

Christian Stimming cstim at code.gnucash.org
Fri Nov 5 17:36:41 EDT 2010


Author: cstim
Date: 2010-11-05 17:36:41 -0400 (Fri, 05 Nov 2010)
New Revision: 19756
Trac: http://svn.gnucash.org/trac/changeset/19756

Modified:
   gnucash/trunk/src/gnome-utils/gnc-dense-cal-store.c
Log:
Fix error in dense-cal widget where the last occurrence of a SX wasn't displayed.

Modified: gnucash/trunk/src/gnome-utils/gnc-dense-cal-store.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-dense-cal-store.c	2010-11-04 18:37:36 UTC (rev 19755)
+++ gnucash/trunk/src/gnome-utils/gnc-dense-cal-store.c	2010-11-05 21:36:41 UTC (rev 19756)
@@ -200,7 +200,12 @@
         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));
 }
 



More information about the gnucash-changes mailing list