From fbabc147bf6b6555197ff3f46e19465a1da3d410 Mon Sep 17 00:00:00 2001 From: Robert Fewell <14uBobIT@gmail.com> Date: Sun, 20 Jan 2019 12:37:44 +0000 Subject: [PATCH] Save the Account page filter setting to the state file Use the newly created functions to save and restore the account filter settings to the saved 'Account Hierarchy' section of the state file. --- gnucash/gnome/gnc-plugin-page-account-tree.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gnucash/gnome/gnc-plugin-page-account-tree.c b/gnucash/gnome/gnc-plugin-page-account-tree.c index 41a28cc9ef..c713f3b338 100644 --- a/gnucash/gnome/gnc-plugin-page-account-tree.c +++ b/gnucash/gnome/gnc-plugin-page-account-tree.c @@ -759,6 +759,10 @@ gnc_plugin_page_account_tree_create_widget (GncPluginPage *plugin_page) gnc_plugin_page_account_tree_summarybar_position_changed, page); + // Read account filter state information from account section + gnc_tree_view_account_restore_filter (GNC_TREE_VIEW_ACCOUNT(priv->tree_view), &priv->fd, + gnc_state_get_current(), gnc_tree_view_get_state_section (GNC_TREE_VIEW(priv->tree_view))); + LEAVE("widget = %p", priv->widget); return priv->widget; } @@ -782,6 +786,10 @@ gnc_plugin_page_account_tree_destroy_widget (GncPluginPage *plugin_page) gnc_plugin_page_account_tree_summarybar_position_changed, page); + // Save account filter state information to account section + gnc_tree_view_account_save_filter (GNC_TREE_VIEW_ACCOUNT(priv->tree_view), &priv->fd, + gnc_state_get_current(), gnc_tree_view_get_state_section (GNC_TREE_VIEW(priv->tree_view))); + // Destroy the filter override hash table g_hash_table_destroy(priv->fd.filter_override);