Bug 799701 - SX Editor error When Frequency=Once

When the frequency is once, in the SX edit frequency tab the scheduled
date is not marked. This is due to the 'first_date' variable not being
set and subsequent test for it being valid causing the calendar to be
cleared.

Add to the test for the recurrence type being 'once'.
pull/2162/head
Robert Fewell 2 months ago
parent 34330c2a57
commit 9214413732

@ -1662,9 +1662,21 @@ gnc_sxed_update_cal (GncSxEditorDialog *sxed)
if (!g_date_valid (&first_date))
{
/* Note: There are no recurrences for PERIOD_NONE and on initial setting
* of PERIOD_WEEKLY (no days set), so still need to 'do nothing' */
gboolean do_nothing = TRUE;
if (recurrences)
{
Recurrence *r = g_list_nth_data (recurrences, 0);
if (r && r->ptype == PERIOD_ONCE)
do_nothing = FALSE;
}
/* Nothing to do. */
gnc_dense_cal_store_clear (sxed->dense_cal_model);
goto cleanup;
if (do_nothing)
{
gnc_dense_cal_store_clear (sxed->dense_cal_model);
goto cleanup;
}
}
gnc_dense_cal_store_update_name (sxed->dense_cal_model, xaccSchedXactionGetName (sxed->sx));

Loading…
Cancel
Save