r15466 - gnucash/trunk/src - Fix specious datafile dirtying in SLR dialog.

Josh Sled jsled at cvs.gnucash.org
Mon Jan 29 20:09:19 EST 2007


Author: jsled
Date: 2007-01-29 20:09:18 -0500 (Mon, 29 Jan 2007)
New Revision: 15466
Trac: http://svn.gnucash.org/trac/changeset/15466

Modified:
   gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
   gnucash/trunk/src/doc/sx.rst
Log:
Fix specious datafile dirtying in SLR dialog.


Modified: gnucash/trunk/src/app-utils/gnc-sx-instance-model.c
===================================================================
--- gnucash/trunk/src/app-utils/gnc-sx-instance-model.c	2007-01-29 20:58:46 UTC (rev 15465)
+++ gnucash/trunk/src/app-utils/gnc-sx-instance-model.c	2007-01-30 01:09:18 UTC (rev 15466)
@@ -1053,6 +1053,12 @@
           gint instance_count = 0;
           gint remain_occur_count = 0;
 
+          // If there are no instances, then skip; specifically, skip
+          // re-setting SchedXaction fields, which will dirty the book
+          // spuriously.
+          if (g_list_length(instances->list) == 0)
+               continue;
+
           last_occur_date = xaccSchedXactionGetLastOccurDate(instances->sx);
           instance_count = gnc_sx_get_instance_count(instances->sx, NULL);
           remain_occur_count = xaccSchedXactionGetRemOccur(instances->sx);

Modified: gnucash/trunk/src/doc/sx.rst
===================================================================
--- gnucash/trunk/src/doc/sx.rst	2007-01-29 20:58:46 UTC (rev 15465)
+++ gnucash/trunk/src/doc/sx.rst	2007-01-30 01:09:18 UTC (rev 15466)
@@ -48,6 +48,7 @@
   - [ ] check variables-unbound logic
   - [ ] verify summary counts
   - [ ] check "since last run" states
+    - [ ] specious datafile dirty-ing?
     - [ ] -autocreate[, ±notify]
     - [ ] +autocreate, -notify
     - [ ] +autocreate, +notify
@@ -57,8 +58,6 @@
     - [?] Expired scheduled transactions never run - <http://bugzilla.gnome.org/show_bug.cgi?id=375892>
 
 - bugs
-  - [ ] specious datafile dirty-ing?
-
   - [ ] with SLR open (with instances), add variables to SX; only newly-created instances will have appropriate variable tables.
 
 ! - [ ] crash with two sx lists open and SX mutation



More information about the gnucash-changes mailing list