From 2c45e0ecba111e1435ea623f74c228a9e6b48610 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 19 Jan 2020 13:26:02 +0000 Subject: [PATCH] The clear cached account model should be after the test for book and root account --- gnucash/gnome-utils/gnc-tree-model-account.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnucash/gnome-utils/gnc-tree-model-account.c b/gnucash/gnome-utils/gnc-tree-model-account.c index 90e2dc9838..c0044b6d98 100644 --- a/gnucash/gnome-utils/gnc-tree-model-account.c +++ b/gnucash/gnome-utils/gnc-tree-model-account.c @@ -1434,10 +1434,6 @@ gnc_tree_model_account_event_handler (QofInstance *entity, account = GNC_ACCOUNT(entity); - /* clear the cached model values for account */ - if (event_type != QOF_EVENT_ADD) - gnc_tree_model_account_clear_cached_values (model, account); - if (gnc_account_get_book (account) != priv->book) { LEAVE("not in this book"); @@ -1448,6 +1444,11 @@ gnc_tree_model_account_event_handler (QofInstance *entity, LEAVE("not in this model"); return; } + + /* clear the cached model values for account */ + if (event_type != QOF_EVENT_ADD) + gnc_tree_model_account_clear_cached_values (model, account); + /* What to do, that to do. */ switch (event_type) {