From 909015dcbfbf2a41157c482891cd535d8a9ffc4b Mon Sep 17 00:00:00 2001 From: Joshua Sled Date: Tue, 30 Jan 2007 01:09:18 +0000 Subject: [PATCH] Fix specious datafile dirtying in SLR dialog. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@15466 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/app-utils/gnc-sx-instance-model.c | 6 ++++++ src/doc/sx.rst | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/app-utils/gnc-sx-instance-model.c b/src/app-utils/gnc-sx-instance-model.c index 018e1fcd47..de57c17ad9 100644 --- a/src/app-utils/gnc-sx-instance-model.c +++ b/src/app-utils/gnc-sx-instance-model.c @@ -1053,6 +1053,12 @@ gnc_sx_instance_model_effect_change(GncSxInstanceModel *model, 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); diff --git a/src/doc/sx.rst b/src/doc/sx.rst index 8f6cf4d0dd..c01467d6ba 100644 --- a/src/doc/sx.rst +++ b/src/doc/sx.rst @@ -48,6 +48,7 @@ TODO - [ ] 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 @@ TODO - [?] Expired scheduled transactions never run - - 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