Skip to content

Commit

Permalink
Fix SX Editor not being able to change the Repeat type from "Until".
Browse files Browse the repository at this point in the history
The way this is stored depends upon the SX End Date being invalid, but
xaccSchedXActionSetLastOccurDate() rejected invalid dates, so once a valid
date had been created, it was impossible to change, except to another valid
date.
  • Loading branch information
jralls committed Mar 1, 2014
1 parent 9f5d62d commit 594aa32
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/engine/SchedXaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,9 +629,11 @@ xaccSchedXactionGetEndDate(const SchedXaction *sx )
void
xaccSchedXactionSetEndDate( SchedXaction *sx, const GDate *newEnd )
{
if (newEnd == NULL
|| !g_date_valid( newEnd )
|| g_date_compare( newEnd, &sx->start_date ) < 0 )
/* Note that an invalid GDate IS a permissable value: It means that
* the SX is to run "forever". See gnc_sxed_save_sx() and
* schedXact_editor_populate() in dialog-sx-editor.c.
*/
if (newEnd == NULL || g_date_compare( newEnd, &sx->start_date ) < 0 )
{
/* XXX: I reject the bad data - is this the right
* thing to do <rgmerk>.
Expand Down

0 comments on commit 594aa32

Please sign in to comment.