gnucash maint: Fix for previous commit 2ff91cf

Robert Fewell bobit at code.gnucash.org
Sun Nov 3 06:32:21 EST 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/0abc09cc (commit)
	from  https://github.com/Gnucash/gnucash/commit/3f6c8478 (commit)



commit 0abc09cc4cc2b99708f03202e0a591a69619dd36
Author: Robert Fewell <14uBobIT at gmail.com>
Date:   Sun Nov 3 11:27:26 2019 +0000

    Fix for previous commit 2ff91cf
    
    When adding new accounts there is no need to clear cached values.

diff --git a/gnucash/gnome-utils/gnc-tree-model-account.c b/gnucash/gnome-utils/gnc-tree-model-account.c
index a8fe36f1f..79de8f420 100644
--- a/gnucash/gnome-utils/gnc-tree-model-account.c
+++ b/gnucash/gnome-utils/gnc-tree-model-account.c
@@ -1427,7 +1427,8 @@ gnc_tree_model_account_event_handler (QofInstance *entity,
     account = GNC_ACCOUNT(entity);
 
     /* clear the cached model values for account */
-    gnc_tree_model_account_clear_cached_values (model, account);
+    if (event_type != QOF_EVENT_ADD)
+        gnc_tree_model_account_clear_cached_values (model, account);
 
     if (gnc_account_get_book (account) != priv->book)
     {



Summary of changes:
 gnucash/gnome-utils/gnc-tree-model-account.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list