Skip to content

Commit

Permalink
Make sure the parent accounts are overridden
Browse files Browse the repository at this point in the history
When the account is overridden, all the parents also need to be
overridden to allow the tree-model filter to show the tree-model leaf.
  • Loading branch information
Bob-IT authored and jralls committed Sep 27, 2016
1 parent 760e30f commit 1a5f012
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/gnome/gnc-plugin-page-account-tree.c
Expand Up @@ -542,7 +542,20 @@ gnc_plugin_page_account_tree_open (Account *account, GtkWindow *win)

if (account != NULL)
{
Account *root_account = gnc_get_current_root_account ();
Account *parent_account = NULL;
Account *temp_account = account;

g_hash_table_insert (priv->fd.filter_override, account, account);

// make sure we overide all the parent accounts to root
while (parent_account != root_account)
{
parent_account = gnc_account_get_parent (temp_account);

g_hash_table_insert (priv->fd.filter_override, parent_account, parent_account);
temp_account = parent_account;
}
gnc_tree_view_account_refilter (GNC_TREE_VIEW_ACCOUNT(priv->tree_view));
gnc_tree_view_account_set_selected_account (GNC_TREE_VIEW_ACCOUNT(priv->tree_view), account);
}
Expand Down

0 comments on commit 1a5f012

Please sign in to comment.