Delete Account: Short circuit checks if no transactions or subaccounts

Count of splits and number of children need to be or'd
This commit is contained in:
Robert Fewell 2020-05-28 12:13:14 +01:00
parent 3457dd150b
commit 890637b2dc

View File

@ -1605,7 +1605,7 @@ gnc_plugin_page_account_tree_cmd_delete_account (GtkAction *action, GncPluginPag
}
// If no transaction or children just delete it.
if (!(xaccAccountCountSplits (account, FALSE) &&
if (!(xaccAccountCountSplits (account, FALSE) ||
gnc_account_n_children (account)))
{
do_delete_account (account, NULL, NULL, NULL);